11gR2ASMOracle

Duplicating a controlfile into ASM when original controlfile is stored on ASM – 11gR2

Here i will be duplicating the controlfile into ASM when the original controlfile is stored in ASM itself on 11.2.0.1.0 version and the database is up with spfile.
Two diskgroups are mounted +DATA and +DATA02.The original controlfile exists in +DATA which we will be duplicating in +DATA02.

[[email protected] ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jun 12 13:19:43 2011
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter spfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/orcl/spfileorcl.ora
SQL> show parameter control_file
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +DATA/orcl/controlfile/current.260.749749843
SQL>

The present controlfile is in +DATA diskgroup which i am going to duplicate on +DATA02

SQL> REM ### CREATING SECOND CONTROLFILE IN DATA02 DISKGROUP ####
SQL> alter system set control_files='+DATA/orcl/controlfile/current.260.749749843','+DATA02'scope=spfile;
System altered.
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Startup nomount the instance

SQL> startup nomount
ORACLE instance started.
Total System Global Area  535662592 bytes
Fixed Size                  1337720 bytes
Variable Size             411043464 bytes
Database Buffers          117440512 bytes
Redo Buffers                5840896 bytes
SQL>
SQL>
SQL> exit

Start the RMAN session

[[email protected] ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Sun Jun 12 13:24:02 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (not mounted)
RMAN> restore controlfile from '+DATA/orcl/controlfile/current.260.749749843';
Starting restore at 12-JUN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/orcl/controlfile/current.260.749749843
output file name=+DATA02/orcl/controlfile/current.257.753629067
Finished restore at 12-JUN-11
RMAN> sql 'alter database mount';
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN>
RMAN> sql 'alter database open';
sql statement: alter database open
RMAN> exit
Recovery Manager complete.

Login to the database and check the name from v$controlfile

SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DATA/orcl/controlfile/current.260.749749843
+DATA02/orcl/controlfile/current.257.753629067
SQL> show parameter control_files
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      +DATA/orcl/controlfile/current.260.749749843,
                                                          +DATA02/orcl/controlfile/current.257.753629067
The spfile was updated automatically, or you can use the below command to update the spfile and bounce the database -
alter system set control_files='+DATA/orcl/controlfile/current.260.749749843','+DATA02/orcl/controlfile/current.257.753629067' scope=spfile;

I didn’t update the spfile and on the next startup the alert log showed

  control_files            = "+DATA/orcl/controlfile/current.260.749749843"
  control_files            = "+DATA02/orcl/controlfile/current.257.753629067"

Leave a Reply