【RMAN】RMAN-05001: auxiliary filename conflicts with the target database

kingsql發表於2015-06-19
在oracle 10.2.0.1中使用duplicate 建立standby的時候,遇到如下錯誤: 
RMAN> duplicate target database for standby;
sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 08/24/2011 10:38:31
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary filename /opt/oracle/oradata/orcl/example01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /opt/oracle/oradata/orcl/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /opt/oracle/oradata/orcl/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /opt/oracle/oradata/orcl/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary filename /opt/oracle/oradata/orcl/system01.dbf conflicts with a file used by the target database
如果在RMAN恢復時不指定 nofilenamecheck 引數,則在資料檔案相同檔名恢復時會出現RMAN-05501錯誤,當主庫,備庫的資料庫檔案目錄是一樣的時候,必須使用 nofilenamecheck引數告訴rman主庫和被建立的備份庫擁有一樣的檔案目錄和檔名。
RMAN> duplicate target database for standby nofilenamecheck;
Starting Duplicate Db at 24-AUG-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=34 devtype=DISK
contents of Memory Script.:
{
   restore clone standby controlfile;
   sql clone 'alter database mount standby database';
}
executing Memory Script

Starting restore at 24-AUG-11
using channel ORA_AUX_DISK_1

failover to previous backup
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /opt/oracle/flash_recovery_area/ORCL/backupset/2011_08_23/o1_mf_ncnnf_TAG20110823T202127_7576t7qv_.bkp
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/opt/oracle/flash_recovery_area/ORCL/backupset/2011_08_23/o1_mf_ncnnf_TAG20110823T202127_7576t7qv_.bkp tag=TAG20110823T202127
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/opt/oracle/oradata/orcl/control01.ctl
output filename=/opt/oracle/oradata/orcl/control02.ctl
output filename=/opt/oracle/oradata/orcl/control03.ctl
Finished restore at 24-AUG-11
sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1
contents of Memory Script.:
{
   set newname for tempfile  1 to 
 "/opt/oracle/oradata/orcl/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to 
 "/opt/oracle/oradata/orcl/system01.dbf";
   set newname for datafile  2 to 
 "/opt/oracle/oradata/orcl/undotbs01.dbf";
   set newname for datafile  3 to 
 "/opt/oracle/oradata/orcl/sysaux01.dbf";
   set newname for datafile  4 to 
 "/opt/oracle/oradata/orcl/users01.dbf";
   set newname for datafile  5 to 
 "/opt/oracle/oradata/orcl/example01.dbf";
   restore
   check readonly
   clone database
   ;
}

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28389881/viewspace-1705376/,如需轉載,請註明出處,否則將追究法律責任。

相關文章