ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【RMAN】RMAN-05001: auxiliary filename conflicts with the target database

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

原创 Linux操作系统 作者:杨奇龙 时间:2011-08-24 13:08:19 0 删除 编辑
在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/22664653/viewspace-705687/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
MySQL DBA NoSQL DEVOPS

注册时间:2009-10-07

  • 博文量
    1026
  • 访问量
    7700589