s/oracle@db11 auxiliary sys/oracle@dupdb
Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 22 05:41:34 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DB11 (DBID=1400765095)
connected to auxiliary database: DUPDB (not mounted)
六,执行duplicate命令
RMAN> duplicate target database to 'dupdb' from active database nofilenamecheck;
附录一,
RMAN> duplicate target database to 'dupdb' from active database nofilenamecheck;
Starting Duplicate Db at 22-MAY-15
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK
contents of Memory Script:
{
sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 217157632 bytes
Fixed Size 2251816 bytes
Variable Size 159384536 bytes
Database Buffers 50331648 bytes
Redo Buffers 5189632 bytes
contents of Memory Script:
{
sql clone "alter system set db_name =
''DB11'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''DUPDB'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
backup as copy current controlfile auxiliary format '/u01/app/oradup/oradata/dupdb/control01.ctl';
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name = ''DB11'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''DUPDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 217157632 bytes
Fixed Size 2251816 bytes
Variable Size 159384536 bytes
Database Buffers 50331648 bytes
Redo Buffers 5189632 bytes
Starting backup at 22-MAY-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/app/oracle11g/product/11.2.0/dbhome_1/dbs/snapcf_db11.f tag=TAG20150224T154659 RECID=13 STAMP=872524019
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 22-MAY-15
database mounted
contents of Memory Script:
{
set newname for datafile 1 to
"/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf";
set newname for datafile 2 to
"/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf";
set newname for datafile 4 to
"/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf";
set newname for datafile 5 to
"/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf";
set newname for datafile 6 to
"/u01/app/oradup/oradata/dupdbundotbs2.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf" datafile
2 auxiliary format
"/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf" datafile
4 auxiliary format
"/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf" datafile
5 auxiliary format
"/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.db |