1. Create a pfile as a backup of your spfile
1 2 3 | sqlplus '/ as sysdba' SQL> create pfile='/tmp/spfile-bk.ora' from spfile; |
2. Update the control_file parameter in the spfile.
1 2 3 4 5 6 7 8 9 | sqlplus '/ as sysdba' SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- +DATA01/test/controlfile/current.200.165920580 SQL> alter system set control_files='+DATA01/test/controlfile/current.200.165920580','+FRA01' scope=spfile sid='*'; |
3. Shutdown / Startup the database in nomount mode
1 2 3 4 | sqlplus '/ as sysdba' SQL> shutdown immediate; SQL> startup nomount; |
4. Copy the new control file using RMAN.
1 2 3 4 5 6 7 8 9 10 11 12 13 | rman RMAN> connect target / RMAN> restore controlfile from '+DATA1/test/controlfile/current.200.165920580'; Starting restore at 01-Aug-23 allocated channel: ORA_DISK_10 channel ORA_DISK_1: sid=testinstance=testdevtype=DISK channel ORA_DISK_1: copied control file copy output filename=+DATA1/test/controlfile/current.200.165920580 output filename=+FRA01/test/controlfile/current.200.693721750 Finished restore at 01-Aug-23 |
5. Modify the spfile with the name of new control file
1 2 3 | sqlplus '/ as sysdba' SQL> alter system set control_files='+DATA01/test/controlfile/current.200.165920580','+FRA01/test/controlfile/current.200.693721750' scope=spfile sid='*'; |
6. Shutdown / Startup the database and check the new control file
1 2 3 4 5 6 7 8 9 10 | sqlplus '/ as sysdba' SQL> shutdown immediate; SQL> startup; SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- +DATA01/test/controlfile/current.200.165920580 +FRA01/test/controlfile/current.200.693721750 |
Hope it worked !!