Tuesday, August 19, 2014

Multiplexing Control File 11gR2 RAC with ASM

1. Connect to the database from any one for the RAC node and check the current control file status. Here, I am having my control file in the +DATA_DC disk group and I want to add another disk group +RECO_DC for multiplexing/mirroring.

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------------------------------------
control_files                        string      +DATA_DC/PROD/controlfile/current.41119.852341131

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA_DC/PROD/controlfile/current.41119.852341131

2. Add the +RECO_DC Diskgroup to the control file by issuing the below command.

SQL> alter system set control_files='+DATA_DC/PROD/controlfile/current.41119.852341131','+RECO_DC' scope=spfile;

System altered.

3. Shutdown the RAC database and start the database in nomount mode.

[oracle@dbrac1 ~]$ srvctl stop database -d PROD

[oracle@dbrac1 ~]$ srvctl status database -d PROD
Instance PROD1 is not running on node inmumdcdbadm01
Instance PROD2 is not running on node inmumdcdbadm02

4. Connect to the DB and you will see the +RECO_DC being part of the control file.

[oracle@dbrac1 ~]$ sqlplus "/as sysdba"

SQL> startup nomount
ORACLE instance started.

Total System Global Area 1.7103E+10 bytes
Fixed Size                  2245512 bytes
Variable Size            3724545144 bytes
Database Buffers         1.3355E+10 bytes
Redo Buffers               21708800 bytes

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------------------------------------------------
control_files                        string      +DATA_DC/PROD/controlfile/current.41119.852341131, +RECO_DC

5. Connect to the RMAN and issuer restore command to create a copy of the control file from the +RECO_DC disk group.

[oracle@dbrac1 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Aug 19 19:06:13 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PROD (not mounted)

RMAN> restore controlfile from '+DATA_DC/PROD/controlfile/current.41119.852341131';

Starting restore at 19-AUG-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1415 instance=PROD1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATA_DC/PROD/controlfile/current.41119.852341131
output file name=+RECO_DC/PROD/controlfile/current.3123.856033587
Finished restore at 19-AUG-14

RMAN> exit

6. Connect back to the data base and issue alter command with the exact path of the file that was created by the restore of RMAN.

[oracle@dbrac1 ~]$ sqlplus "/as sysdba"

SQL> alter system set control_files='+DATA_DC/PROD/controlfile/current.41119.852341131','+RECO_DC/PROD/controlfile/current.3123.856033587' scope=spfile;

System altered.

7. Now, shutdown the database and start up. Use the below commands.

SQL> Shutdown immediate;

ORA-01507: database not mounted
ORACLE instance shut down.

[oracle@dbrac1 ~]$ srvctl start database -d PROD
Instance PROD1 is running on node inmumdcdbadm01
Instance PROD2 is running on node inmumdcdbadm02

8. Check by connecting to the RAC database, you will see the two copies of control files in two different disk groups, +DATA_DC and +RECO_DC.

[oracle@dbrac1 ~]$ sqlplus "/ as sysdba"

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA_DC/PROD/controlfile/current.41119.852341131
+RECO_DC/PROD/controlfile/current.3123.856033587

SQL> exit

No comments:

Post a Comment