connected to target database: HJJ (DBID=2845675742)
connected to auxiliary database: HJJDB (not mounted)
RMAN> duplicate target database to hjjdb nofilenamecheck;
Starting Duplicate Db at 05-MAR-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=135 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 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 109055064 bytes
Database Buffers 197132288 bytes
Redo Buffers 6336512 bytes
contents of Memory Script:
{
sql clone "alter system set db_name =
''HJJ'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''HJJDB'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile;
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name = ''HJJ'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''HJJDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 109055064 bytes
Database Buffers 197132288 bytes
Redo Buffers 6336512 bytes
Starting restore at 05-MAR-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=12 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece +DG_FRA/hjj/autobackup/2014_03_05/s_841366547.267.841366555
channel ORA_AUX_DISK_1: piece handle=+DG_FRA/hjj/autobackup/2014_03_05/s_841366547.267.841366555 tag=TAG20140305T005547
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05
output file name=+DATA_DG/hjjdb/control01.ctl
output file name=+DG_FRA/hjjdb/control02.ctl
Finished restore at 05-MAR-14
database mounted
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
contents of Memory Script:
{
set until scn 1975002;
set newname for datafile 1 to
"+data_dg";
set newname for datafile 2 to
"+data_dg";
set newname for datafile 3 to
"+data_dg";
set newname for datafile 4 to
"+data_dg";
set newname for datafile 5 to
"+DATA_DG/hjjdb/datafile/tbs01.dbf";
set newname for datafile 6 to
"+DATA_DG/hjjdb/datafile/rman_tbs0.dbf";
restore
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 05-MAR-14
using channel ORA_AUX_DISK_1
。。。。。。。。。。。。。。。省略了很多行。。。。。。。。。。。。。。。。
至此,基于备份的RMAN DUPLICATE测试完成。
9.遇到的问题以及解决
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/05/2014 00:51:41
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name +DATA_DG/hjj/onlinelog/group_1.258 conflicts with a file used by the target database