This examle shows how to multiply control files in Oracle Database RAC 11g.
[[email protected] ~]$ srvctl stop DATABASE -d racdb1 [[email protected] ~]$ 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.
[[email protected] ~]$ asmcmd ASMCMD> ls RACDB_DATA/RACDB1/CONTROLFILE/ Current.256.709676643 ASMCMD> ls FRA/RACDB1/CONTROLFILE/ Current.256.709676647
[[email protected] ~]$ 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)
[[email protected] ~]$ 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.
[[email protected] ~]$ 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)
[[email protected] ~]$ srvctl start database -d racdb1 [[email protected] ~]$ srvctl status database -d racdb1 Instance racdb11 is running on node rac1 Instance racdb12 is running on node rac2
Cheers!!
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.