RMAN “duplicate target database to NEW from active database” 11G
Every one who used RMAN in previous version of the Oracle database is familiar with the duplicate target database method.
Now Oracle introduced the 11G new feature method of create duplicate database without using any type of staging area.
I was asked to create an duplicate instance as acceptance database from a running 11.2 production database.
Here is a quick overview on how to use the new method.
Create a new instance on the destination server using a clean pfile.
Make sure the listener is aware of this new instance and make sure both server are able to resolve both databases using a correctly configured tnsnames.
When every thing is set , you can now preform the following action to make the magic work for you :
oracle@DBPRD01:~> rman target=sys/xxx@P001 auxiliary=sys/yyy@A001;
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Apr 8 11:38:28 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: P001 (DBID=1286976893)
connected to auxiliary database: A001 (not mounted)
RMAN> duplicate target database to A001 from active database;
…
executing command: SET NEWNAME
Starting backup at 08-APR-10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/u02/oradata/P001/datafile/o1_mf_data_5n7odopv_.dbf
channel ORA_DISK_2: starting datafile copy
input datafile file number=00007 name=/u02/oradata/P001/datafile/o1_mf_data_5r0s5q0m_.dbf
channel ORA_DISK_3: starting datafile copy
input datafile file number=00001 name=/u02/oradata/P001/datafile/o1_mf_system_02l2n82u_.dbf
channel ORA_DISK_4: starting datafile copy
input datafile file number=00004 name=/u02/oradata/P001/datafile/o1_mf_users_05l2n853_.dbf
output file name=/u02/oradata/A001/datafile/o1_mf_users_1ilajrhg_.dbf tag=TAG20100408T114031
channel ORA_DISK_4: datafile copy complete, elapsed time: 00:01:05
channel ORA_DISK_4: starting datafile copy
input datafile file number=00002 name=/u02/oradata/P001/datafile/o1_mf_sysaux_03l2n82u_.dbf
output file name=/u02/oradata/A001/datafile/o1_mf_system_1hlajrhg_.dbf tag=TAG20100408T114031
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:01:24
channel ORA_DISK_3: starting datafile copy
input datafile file number=00003 name=/u02/oradata/P001/datafile/o1_mf_undotbs1_04l2n851_.dbf
output file name=/u02/oradata/A001/datafile/o1_mf_sysaux_1jlajrjk_.dbf tag=TAG20100408T114031
channel ORA_DISK_4: datafile copy complete, elapsed time: 00:01:12
channel ORA_DISK_4: starting datafile copy
input datafile file number=00006 name=/u02/oradata/P001/datafile/o1_mf_indx_5n7okw29_.dbf
output file name=/u02/oradata/A001/datafile/o1_mf_undotbs1_1klajrk6_.dbf tag=TAG20100408T114031
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:01:05
output file name=/u02/oradata/A001/datafile/o1_mf_indx_1llajrm0_.dbf tag=TAG20100408T114031
channel ORA_DISK_4: datafile copy complete, elapsed time: 00:00:15
output file name=/u02/oradata/A001/datafile/o1_mf_data_1glajrhg_.dbf tag=TAG20100408T114031
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:09:19
…
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=715780614 file name=/u02/oradata/A001/datafile/o1_mf_sysaux_1jlajrjk_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=715780614 file name=/u02/oradata/A001/datafile/o1_mf_undotbs1_1klajrk6_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=715780614 file name=/u02/oradata/A001/datafile/o1_mf_users_1ilajrhg_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=715780614 file name=/u02/oradata/A001/datafile/o1_mf_data_1flajrhg_.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=715780614 file name=/u02/oradata/A001/datafile/o1_mf_indx_1llajrm0_.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=6 STAMP=715780614 file name=/u02/oradata/A001/datafile/o1_mf_data_1glajrhg_.dbf
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 08-APR-10
RMAN>
All done !

Comments are closed.