Skip to main content

Migrate 11.2.0 database from UFS to ASM

Hi,

This post will illustrate steps for migrating datafiles from UFS (or any other file system) to ASM Disk groups.

Step1:

Perform Full Rman Database backup:

Step2:


Shut down and startup database in mount;




SQL> startup mount
ORACLE instance started.

Total System Global Area 1720844288 bytes
Fixed Size 2159024 bytes
Variable Size 1241517648 bytes
Database Buffers 469762048 bytes
Redo Buffers 7405568 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options



Step 3:


Connect database target using rman utility and use command COPY database.




bash-3.00$ rman

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Oct 27 13:01:51 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

RMAN> connect target\

target database Password:
connected to target database: DB1 (DBID=1326750269, not open)

RMAN> BACKUP AS COPY DATABASE FORMAT '+ASMDATA1';

Starting backup at 27-OCT-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=134 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/11g_Home/oradata/db1/system01.dbf
output file name=+ASMDATA1/db1/datafile/system.257.733496553 tag=TAG20101027T130232 RECID=2 STAMP=733496609
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/11g_Home/oradata/db1/sysaux01.dbf
output file name=+ASMDATA1/db1/datafile/sysaux.258.733496619 tag=TAG20101027T130232 RECID=3 STAMP=733496663
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u01/11g_Home/oradata/db1/example01.dbf
output file name=+ASMDATA1/db1/datafile/example.259.733496673 tag=TAG20101027T130232 RECID=4 STAMP=733496690
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/11g_Home/oradata/db1/undotbs01.dbf
output file name=+ASMDATA1/db1/datafile/undotbs1.260.733496699 tag=TAG20101027T130232 RECID=5 STAMP=733496706
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+ASMDATA1/db1/controlfile/backup.261.733496707 tag=TAG20101027T130232 RECID=6 STAMP=733496708
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/11g_Home/oradata/db1/users01.dbf
output file name=+ASMDATA1/db1/datafile/users.262.733496711 tag=TAG20101027T130232 RECID=7 STAMP=733496710
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 27-OCT-10

RMAN>



Step 4:

Use command switch database to copy to duplicate your files



RMAN> SWITCH DATABASE TO COPY;

datafile 1 switched to datafile copy "+ASMDATA1/db1/datafile/system.257.733496553"
datafile 2 switched to datafile copy "+ASMDATA1/db1/datafile/sysaux.258.733496619"
datafile 3 switched to datafile copy "+ASMDATA1/db1/datafile/undotbs1.260.733496699"
datafile 4 switched to datafile copy "+ASMDATA1/db1/datafile/users.262.733496711"
datafile 5 switched to datafile copy "+ASMDATA1/db1/datafile/example.259.733496673"



Step 5:

Use set new name for tempfile:



RMAN> run {
2> set newname for tempfile 1 to '+ASMDATA1';
3> set newname for tempfile 2 to '+ASMDATA1';
4> }
executing command: SET NEWNAME

executing command: SET NEWNAME

RMAN>



Step 6 :

open database with alter database command and verify new location of datafiles




RMAN> ALTER DATABASE OPEN;

database opened









SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+ASMDATA1/db1/datafile/system.257.733496553
+ASMDATA1/db1/datafile/sysaux.258.733496619
+ASMDATA1/db1/datafile/undotbs1.260.733496699
+ASMDATA1/db1/datafile/users.262.733496711
+ASMDATA1/db1/datafile/example.259.733496673

SQL>



Thanks for reading.....

Comments

Popular posts from this blog

Disable Firewall on Oracle Linux 8

In this blogpost we will see how we can stop/disable the firewall on Oracle Linux 8, the firewall command is same in both linux 7 an linux 8. The below listed is the procedure for stopping and disabling the  firewall on Oracle Linux 8. - Here we can see the firewall deamon in active state - Here when we stop the firewall in previous command, now the firewall daemon is dead - For permanent disabling the firewall on server, we can use "disable" option The following commands will be helpful: #systemctl status firewalld #systemctl stop firewalld #systemctl disable firewalld #systemctl enable firewalld #systemctl start firewalld Hope it helps !! Thanks for reading :) regards, X A H E E R

Enable Desktop on Oracle Solaris 11.4

Oracle Solaris 11 installation has multiple options to choose for installation of an Operating Environment, but mostly Oracle Solaris text install media is used and this installation media doesn't offer the GUI Desktop Environment by default after the installation. This blog post will explain how we can enable the desktop for Oracle Solaris 11.4 operating system, after the completion of installation. We have to install "solaris-desktop" package and reboot the machine and GUI desktop will be enabled for the Operating System. In this blog post my virtual machine is connected to the internet and hence I am able to use available pupblic repository for package installation, if in case internet is not available for the server/machine then we have configure the local/Server  repository for the installation. Follow the below steps for desktop package installation: After installation of dekstop package we are now able to login with GUI desktop environment...

Oracle Applications R12.2 Installation on Linux using virtual box

Oracle E-Business suite R12.2 is released a month ago. I received too many requests from my followers to demonstrate this Installation. This is a step by step detailed article for Installing Oracle E-business suite R12,2 on Oracle Enterprise Linux 5.7 (64-bit). I've used oracle virtual box for Installing Linux. Note:  This Installation is demonstrated on virtual machine with 8GB RAM and Installation completed in 7 hours. I am not sure whether this Installation will work with less than this .  My Virtual Machine configuration: CPU    = 1 core RAM   = 8 GB HDD   =  380 GB Software's Required: 1) Oracle Virtual Box 2) Oracle Enterprise Linux 5.7 (64-bit) 3) Oracle E-Business suite R12.2 for LinuxX86-64-bit Installation Steps: Hardware requirements Create virtual machine and Install operating system Operating System pre-requisites Prepare Stage Area Install Oracle EBS R12.2 software Verify Insta...