[20171221]RMAN-05501.txt

[20171221]RMAN-05501 aborting duplication of target database.txt

--//昨天使用rman duplicate建立dg,出现如下错误:
rman > duplicate target database for standby from active database;
....
sql statement: alter database mount standby database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/20/2017 10:22:22
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /mnt/ramdisk/book/tea01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /mnt/ramdisk/book/example01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /mnt/ramdisk/book/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /mnt/ramdisk/book/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /mnt/ramdisk/book/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /mnt/ramdisk/book/system01.dbf conflicts with a file used by the target database

--//百度发现,实际上加入参数nofilenamecheck就ok了.

--//如果在RMAN恢复时不指定 nofilenamecheck 参数,则在数据文件相同文件名恢复时会出现RMAN-05501错误,当主库,备库的数据库文件
--//目录是一样的时候,必须使用 nofilenamecheck参数告诉rman主库和被创建的备份库拥有一样的文件目录和文件名。

--//这种情况主要是2边的db_file_name_convert,log_file_name_convert参数一样,oracle必须明确指定nofilenamecheck.否者报如下错
--//误,oracle这样做的目的估计避免覆盖吧.

SYS@bookdg> show parameter convert
NAME                  TYPE   VALUE
--------------------- ------ ------------------------------------
db_file_name_convert  string /mnt/ramdisk/book, /mnt/ramdisk/book
log_file_name_convert string /mnt/ramdisk/book, /mnt/ramdisk/book

--//执行如下命令,ok:
RMAN> duplicate target database for standby from active database nofilenamecheck;

上一篇:[20180627]truncate table的另类恢复.txt


下一篇:如何破解HBase+Elasticsearch组合使用遇到的难题