This examle shows how to multiply control files in Oracle Database RAC 11g.
[oracle@rac1 ~]$ srvctl stop DATABASE -d racdb1 [oracle@rac1 ~]$ sqlplus / as sysdba SQL> startup ... ... DATABASE mounted. DATABASE opened. SQL> SHOW parameter control_files NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string +RACDB_DATA/racdb1/controlfile /current.256.709676643, +FRA/r acdb1/controlfile/current.256. 709676647 SQL> SELECT name FROM v$controlfile; NAME -------------------------------------------------------------------------------- +RACDB_DATA/racdb1/controlfile/current.256.709676643 +FRA/racdb1/controlfile/current.256.709676647 SQL> shutdown immediate DATABASE closed. DATABASE dismounted. ORACLE instance shut down. Start oracle DATABASE IN nomount state ON node 1 [racdb11]. SQL> startup nomount ORACLE instance started.
[grid@rac1 ~]$ asmcmd ASMCMD> ls RACDB_DATA/RACDB1/CONTROLFILE/ Current.256.709676643 ASMCMD> ls FRA/RACDB1/CONTROLFILE/ Current.256.709676647
[oracle@rac1 ~]$ rman target / Recovery Manager: Release 11.2.0.1.0 - Production on Fri Jun 10 11:11:11 2111 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: RACDB1 (not mounted) RMAN> restore controlfile to '+RACDB_DATA' from '+RACDB_DATA/RACDB1/CONTROLFILE/Current.256.709676643'; Starting restore at 10-JUN-2011 11:11:12 using channel ORA_DISK_1 channel ORA_DISK_1: copied control file copy Finished restore at 10-JUN-2011 11:11:13 RMAN> restore controlfile to '+FRA' from '+FRA/RACDB1/CONTROLFILE/Current.256.709676647'; Starting restore at 10-JUN-2011 12:00:53 using channel ORA_DISK_1 channel ORA_DISK_1: copied control file copy Finished restore at 10-JUN-2011 12:01:11 RMAN> exit Recovery Manager complete.
4. Again, check control files on ASM in DATA and FRA (as a grid user)
[grid@rac1 ~]$ asmcmd ASMCMD> ls RACDB_DATA/RACDB1/CONTROLFILE/ Current.256.709676643 current.269.753451111 ASMCMD> ls FRA/RACDB1/CONTROLFILE/ Current.256.709676647 current.261.753451255
Now, we can observe that multiple control files have been created.
[oracle@rac1 ~]$ sqlplus / as sysdba SQL> CREATE pfile FROM spfile; File created. #Shutdown DATABASE. SQL> Shutdown immediate; ORA-01507: DATABASE NOT mounted ORACLE instance shut down.
From:
*.control_files='+RACDB_DATA/racdb1/controlfile/current.256.709676643', '+FRA/racdb1/controlfile/current.256.709676647'
To (one line in editor):
*.control_files='+RACDB_DATA/racdb1/controlfile/current.256.709676643', '+RACDB_DATA/racdb1/controlfile/current.269.753451111', '+FRA/racdb1/controlfile/current.256.709676647', '+FRA/racdb1/controlfile/current.261.753451255'
SQL> startup pfile=/u01/app/oracle/product/11.2.0/db_1/dbs/initracdb11.ora ORACLE instance started. ... ... Database mounted. Database opened. SQL> create spfile from pfile ; File created.
SQL> startup force ... ... DATABASE opened. SQL> SHOW parameter control_files +RACDB_DATA/racdb1/controlfile/current.256.709676643, +RACDB_DATA/racdb1/controlfile/current.269.753451111, +FRA/racdb1/controlfile/current.256.709676647, +FRA/racdb1/controlfile/current.261.753451255
SQL> shutdown immediate; Database closed. Database dismounted.
Following steps need to be carry out on the second node, here rac2 [racdb12]
SQL> startup nomount ORACLE instance started. ... ... SQL> CREATE pfile FROM spfile; File created.
SQL> shutdown immediate; DATABASE closed. DATABASE dismounted.
#from *.control_files='+RACDB_DATA/racdb1/controlfile/current.256.709676643', '+FRA/racdb1/controlfile/current.256.709676647' # to (one line in editor) *.control_files='+RACDB_DATA/racdb1/controlfile/current.256.709676643', '+RACDB_DATA/racdb1/controlfile/current.269.753451111', '+FRA/racdb1/controlfile/current.256.709676647', '+FRA/racdb1/controlfile/current.261.753451255'
SQL> startup pfile=/u01/app/oracle/product/11.2.0/db_1/dbs/initracdb12.ora; DATABASE opened. --Check the control_files parameter: SQL> SHOW parameter control_files; +RACDB_DATA/racdb1/controlfile/current.256.709676643, +RACDB_DATA/racdb1/controlfile/current.269.753451111, +FRA/racdb1/controlfile/current.256.709676647, +FRA/racdb1/controlfile/current.261.753451255
SQL> CREATE spfile FROM pfile; File created. SQL> shutdown immediate DATABASE closed. DATABASE dismounted.
On the firts node (rac1)
[oracle@rac1 ~]$ srvctl start database -d racdb1 [oracle@rac1 ~]$ srvctl status database -d racdb1 Instance racdb11 is running on node rac1 Instance racdb12 is running on node rac2
Cheers!!