RMANRMAN-05001: auxiliary filename conflicts with the target database

Posted ChavinKing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RMANRMAN-05001: auxiliary filename conflicts with the target database相关的知识,希望对你有一定的参考价值。

oracle 11.2.0.4 运行以下脚本,使用活动数据库复制技术创建dataguard备库报错rman-005001:


run{
duplicate target database
for standby
from active database
spfile
     set db_unique_name=‘dbkingstd‘
     set log_file_name_convert ‘/u01/app/oracle/oradata/dbking‘,‘/u01/app/oracle/oradata/dbking‘
     set db_file_name_convert ‘/u01/app/oracle/oradata/dbking‘,‘/u01/app/oracle/oradata/dbking‘
     set control_files=‘/u01/app/oracle/oradata/dbking/control.ctl‘
     set log_archive_dest_2=‘service=dbkingpri lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=dbkingpri‘
     set fal_client=‘dbkingstd‘
     set fal_server=‘dbkingpri‘
;
}

 

报错信息如下:

 

RMAN-05538: WARNING: implicitly using DB_FILE_NAME_CONVERT
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/28/2017 17:51:19
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/dbking/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/dbking/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/dbking/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/dbking/system01.dbf conflicts with a file used by the target database


原因:如果在RMAN恢复时不指定 nofilenamecheck 参数,则在数据文件相同文件名恢复时会出现RMAN-005001错误,当主库,备库的数据库文件目录是一样的时候,必须使用 nofilenamecheck参数告诉rman主库和被创建的备份库拥有一样的文件目录和文件名。
修改脚本如下,再次尝试创建备库成功:

 

run{
duplicate target database
for standby nofilenamecheck
from active database
spfile
     set db_unique_name=‘dbkingstd‘
     set log_file_name_convert ‘/u01/app/oracle/oradata/dbking‘,‘/u01/app/oracle/oradata/dbking‘
     set db_file_name_convert ‘/u01/app/oracle/oradata/dbking‘,‘/u01/app/oracle/oradata/dbking‘
     set control_files=‘/u01/app/oracle/oradata/dbking/control.ctl‘
     set log_archive_dest_2=‘service=dbkingpri lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=dbkingpri‘
     set fal_client=‘dbkingstd‘
     set fal_server=‘dbkingpri‘
;
}

以上是关于RMANRMAN-05001: auxiliary filename conflicts with the target database的主要内容,如果未能解决你的问题,请参考以下文章

RMAN-04006: error from auxiliary database

hdu 5927 Auxiliary Set 贪心

hdu-5927 Auxiliary Set(树形dp)

auxiliary/scanner常见模块的含义

HDU 5927 Auxiliary Set (dfs)

HDMI之(AVI)Auxiliary Video Information InfoFrame