After database name has been changed, the controlfiles are still staying in the directory of old database, so we need relocate them into directory of new database name.
Subscribe to get access
Read more of this content when you subscribe today.
After database name has been changed, the controlfiles are still staying in the directory of old database, so we need relocate them into directory of new database name.
Read more of this content when you subscribe today.
Use RMAN command “restore controlfile from” to duplicate a controlfile.
Playing around to add another control file into ‘+DATA2’ disk group.
Check current control files
SQL> select name from v$controlfile; NAME ---------------------------------------------------------- +DATA2/ractest/controlfile/current.523.925063153 +FRA/ractest/controlfile/current.1395.925063153 SQL> show parameter control_file NAME TYPE VALUE ------------------------------------ ----------- ------------------------- control_file_record_keep_time integer 7 control_files string +DATA2/ractest/controlfile/current.523.925063153, +FRA/ractest/controlfile/current.1395.925063153
Change “control_file” parameter in spfile only.
SQL> alter system set control_files='+DATA2','+DATA2/ractest/controlfile/current.523.925063153','+FRA/ractest/controlfile/current.1395.925063153' scope=spfile;
System altered.
Shut down and startup in nomount mode.
SQL> shutdown immediate; Database dismounted. ORACLE instance shut down. SQL> startup nomount; ORACLE instance started. Total System Global Area 8551575552 bytes Fixed Size 2270360 bytes Variable Size 1543506792 bytes Database Buffers 6996099072 bytes Redo Buffers 9699328 bytes
Copy another control file to ‘+DATA2’ by restoring from any current available control file.
RMAN> restore controlfile from '+DATA2/ractest/controlfile/current.523.925063153';
Starting restore at 13-OCT-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=58 instance=ractest1 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA2/ractest/controlfile/current.555.925125605 <-- New one
output file name=+DATA2/ractest/controlfile/current.523.925063153 <-- Old one
output file name=+FRA/ractest/controlfile/current.1395.925063153 <-- Old one
Finished restore at 13-OCT-16
RMAN> exit
Recovery Manager complete.
Check the parameter ‘control_file’ was updated automatically.
SQL> show parameter control_file NAME TYPE VALUE ------------------------------ ------- ---------------------- control_file_record_keep_time integer 7 control_files string +DATA2/ractest/controlfile/current.555.925125605, +DATA2/ractest/controlfile/current.523.925063153, +FRA/ractest/controlfile/current.1395.925063153 SQL> alter database open; Database altered. SQL> show parameter control_file NAME TYPE VALUE ----------------------------- ------- ------------------------------ control_file_record_keep_time integer 7 control_files string +DATA2/ractest/controlfile/current.555.925125605, +DATA2/ractest/controlfile/current.523.925063153, +FRA/ractest/controlfile/current.1395.925063153