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 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.

[oracle@anand-lab ~]$ sqlplus / as sysdba

SQL*Plus: Release 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 - 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

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

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.

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> exit

Start the RMAN session

[oracle@anand-lab ~]$ rman target /

Recovery Manager: Release - 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> 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;


SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      +DATA/orcl/controlfile/current.260.749749843,     

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s