Clone Database in ASM Warning

While cloning database on a different server, we may get a warning when using ASM filesystem.

We should not set (dblog)_file_name_convert as Note:380449.1 says. According to Oracle,as long as diskgroup name is not changed between primary and standby (e.g. remains as DATA or FRA)and OMF is used, the duplicate command automatically creates path +diskgroup/db_unique_name, e.g.,+DATA/BOSTON. Furthermore, if OMF is used, control_files does not need to be specified in standbypfile or spfile; duplicate will figure out the path.

So make sure, you have correct db_unique_name in init.ora file and rman will take care of putting in the right location.

To migrate CONTROLFILE from cooked file system to ASM

Initial control file will be on filesystem

*.control_files='/oracle/product/10.2.0/db_2/dbs/C481.ctl'
#*.control_files='+SHARED_DATA_DG01'

"initC481.ora" 57 lines, 1776 characters

Database is mounted


[cltpbgscdb04:oracle]/oracle/product/10.2.0/db_2/dbs> s

17:05:47 SYS@C481 SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
17:05:55 SYS@C481 SQL> startup nomount
ORACLE instance started.

Total System Global Area 775946240 bytes
Fixed Size 2141696 bytes
Variable Size 249975296 bytes
Database Buffers 469762048 bytes
Redo Buffers 54067200 bytes
17:06:01 SYS@C481 SQL> alter database mount standby database;

Database altered.

Elapsed: 00:00:04.37

Connect to RMAN and copy controlfile to ASM


[cltpbgscdb04:oracle]/oracle/product/10.2.0/db_2/dbs> rman target / catalog rmanadm1/rmanadm1@infra

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Aug 17 17:06:30 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database: P481 (DBID=2656166842, not open)
connected to recovery catalog database

RMAN> copy current controlfile to '+SHARED_DATA_DG01/c481/controlfile/control01.ctl';

Starting backup at 17-AUG-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=323 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=654 devtype=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output filename=+SHARED_DATA_DG01/c481/controlfile/control01.ctl tag=TAG20090817T170830 recid=88 stamp=695149715
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
Finished backup at 17-AUG-09

Starting Control File Autobackup at 17-AUG-09
piece handle=/ora01/orabkup/P481/rman/cf_c-2656166842-20090817-06.bak comment=NONE
Finished Control File Autobackup at 17-AUG-09

RMAN> exit


Recovery Manager complete.

Shutdown the database, modify the controlfile to new file in init.ora or spfile


17:08:56 SYS@C481 SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.

#*.control_files='/oracle/product/10.2.0/db_2/dbs/C481.ctl'
*.control_files='+SHARED_DATA_DG01/c481/controlfile/control01.ctl'

"initC481.ora" 57 lines, 1807 characters

Startup the database


17:09:57 @ SQL> startup nomount
ORACLE instance started.

Total System Global Area 775946240 bytes
Fixed Size 2141696 bytes
Variable Size 249975296 bytes
Database Buffers 469762048 bytes
Redo Buffers 54067200 bytes
17:10:03 @ SQL> alter database mount standby database;

Database altered.

09:12:37 SYS@C481 SQL> show parameter control

NAME TYPE VALUE
------------------------------------ ------------ ------------------------------
control_file_record_keep_time integer 7
control_files string +SHARED_DATA_DG01/c481/control
file/control01.ctl