重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 938|回复: 0
打印 上一主题 下一主题

[Oracle] RMAN Active Duplicate Fails With RMAN-03009 ORA-01537

[复制链接]
跳转到指定楼层
楼主
发表于 2023-8-6 10:32:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
现象:
RMAN active duplicate to create the standby database fails with the below errors

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/12/2021 11:35:46
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of switch command on clone_default channel at 12/12/2021 11:35:46
ORA-01537: cannot add file '/data/xxxxxx/datafile/temp4.dbf' - file already part of database

原因:
RMAN script contains the below set newname clause for the tempfiles. Since the script contains all the set newname clauses for the same tempfile (tempfile 1 in this case), the error was reported


SET NEWNAME FOR TEMPFILE 1 TO '/data/xxxxxx/datafile/temp1.dbf';
SET NEWNAME FOR TEMPFILE 1 TO '/data/xxxxxx/datafile/temp2.dbf';
SET NEWNAME FOR TEMPFILE 1 TO '/data/xxxxxx/datafile/temp3.dbf';
SET NEWNAME FOR TEMPFILE 1 TO '/data/xxxxxx/datafile/temp4.dbf';
duplicate target database for standby from active database NOFILENAMECHECK;


解决方法:
Modify the RMAN script to contain the set newname with the correct tempfile id

The below command can be used on the source database to confirm the tempfile id

select file_id, file_name  from dba_temp_files where tablespace_name='&temp_tablespace_name';
--Substitute the temp tablespace name in the above command

After correcting the set newname clauses, the RMAN duplicate was successful

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-28 02:50 , Processed in 0.102664 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表