Sometimes We need to duplicate our Control file due to do security issue. Oracle recommended to use 3 control file for your database. In this post I will try to explain how We can duplicate a control file when ASM is involved.

My environment is 2 Node 11.2.0.2 RAC system. My database SID is RAC00

Here is the our steps:

1) Check current control file:

SQL> select name from v$controlfile;

NAME
——————————————————————————–
+ORADATA/RAC00/controlfile/current.260.737948993

2) For can duplicate our control file our database must be down. So I am going to close my database first:

srvctl stop database -d PBAL00

3) After my database down. I am loginning one of the my node. In my case I am loginning node 1:

On node1:
Set DB env. than:

sqlplus “/as sysdba”
startup nomount

4) On node1 set ASM env. than check your current controlfile:

# asmcmd -p
ASMCMD> cd ORADATA/RAC00/CONTROLFILE/
ASMCMD [+ORADATA/RAC00/controlfile] > ls
Current.260.737948993

5) On node1 Set DB env. than:
rman target /
RMAN> restore controlfile to ‘+ORADATA’ from ‘+ORADATA/RAC00/controlfile/current.260.737948993’ ; << this will create 2th controlfile
RMAN> restore controlfile to ‘+ORADATA’ from ‘+ORADATA/RAC00/controlfile/current.260.737948993′ ; << this will create 3th controlfile
6) Checking those file create or not follow setp 4 and use ls command
# asmcmd -p
ASMCMD> cd ORADATA/RAC00/CONTROLFILE/
ASMCMD [+ORADATA/RAC00/controlfile] > ls
Current.260.737948993
CONTROLFILE UNPROT FINE AUG 03 18:00:00 Y current.1246.790368295
CONTROLFILE UNPROT FINE AUG 03 18:00:00 Y current.1247.790368311

As you can see We have new 2 controlfile

7) On node1 Set DB env. than:

sqlplus “/as sysdba”

SQL> alter system set control_files=’+ORADATA/RAC00/controlfile/current.260.737948993′,’+ORADATA/RAC00/controlfile/current.1246.790368295′,’+ORADATA/RAC00/controlfile/current.1247.790368311′ scope=spfile sid=’*’;

SQL> shutdown immediate

9) Start your db
srvctl start database -d PBAL00

Reference:
How to duplicate a controlfile when ASM is involved [ID 345180.1]

 

 

 

 

Advertisements