This little exercise will demonstrate how we can move the control file from one ASM disk group to another or make multiple copies of the control file or even move the control file from the file system to ASM. First change the initialization parameter for the new location of the control files. We should at a minimum always multiplex the control files in ASM. One copy of the control file should go into the +DATA disk group. Another copy of the control file should go to the +FRA disk group:
SQL> alter system set control_files='+DATA/PROD/controlfile/control01.ctl','+fra/PROD/controlfile/control02.ctl' scope=spfile; System altered.
Next, we need to shutdown the database and start an instance in nomount mode. If you are on RAC, this is particularly important as all instances need to be down:
[oracle@rhel59a dbca]$ rman target / RMAN> shutdown immediate; using target database control file instead of recovery catalog Oracle instance shut down RMAN> startup nomount; connected to target database (not started) Oracle instance started Total System Global Area 801701888 bytes Fixed Size 2232640 bytes Variable Size 595594944 bytes Database Buffers 197132288 bytes Redo Buffers 6742016 bytes
Next, we want to restore the control file from one of the copies (what was the original control_files initialization parameter) and mount the database to confirm that it worked:
RMAN> restore controlfile from '+DATA02/PROD/controlfile/current.266.809597795'; Starting restore at 11-MAR-13 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=16 instance=PROD1 device type=DISK channel ORA_DISK_1: copied control file copy output file name=+DATA/PROD/controlfile/control01.ctl output file name=+FRA/PROD/controlfile/control02.ctl Finished restore at 11-MAR-13 RMAN> alter database mount; database mounted released channel: ORA_DISK_1
As the final step, we want to shut the instance down again and bring the database up across all the RAC nodes with the srvctl command:
RMAN> shutdown immediate; database dismounted Oracle instance shut down RMAN> exit Recovery Manager complete. [oracle@rhel59a dbca]$ srvctl start database -d PROD SQL> show parameter control_files NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string +DATA/PROD/controlfile/contr ol01.ctl, +FRA/PROD/controlf ile/control02.ctl