RMAN DUPLICATE DATABASE with SET NEWNAME failed: RMAN-05501 RMAN-05517 (Doc ID 387093.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.2 to 11.2.0.4 [Release 10.2 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 7-Dec-2015***

SYMPTOMS

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.
 
For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:
出于本文档的目的,以以下虚拟环境为例来描述该过程
Primary Database:
DB_NAME: ORCL

Standby Database:
DB_UNIQUE_NAME: DUP

Executing RMAN DUPicate , on same host as Target Database using SET NEWNAME to redirect datafiles to new location.
使用 SET NEWNAME 在目标数据库所在的主机上执行 RMAN DUPlicate ,以将数据文件重定向到新位置。

SET NEWNAME has been specified for all datafiles for example like following RMAN script:
已为所有数据文件指定SET NEWNAME,例如以下RMAN脚本:

RMAN> run {
allocate auxiliary channel a1 device type disk ;
SET NEWNAME for datafile 1 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\SYSTEM01.DBF';
SET NEWNAME for datafile 2 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\UNDOTBS01.DBF';
SET NEWNAME for datafile 3 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\SYSAUX01.DBF';
SET NEWNAME for datafile 4 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\USERS01.DBF';
SET NEWNAME for datafile 5 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\EXAMPLE01.DBF';
SET NEWNAME for datafile 6 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\USERS02.DBF';
SET NEWNAME for datafile 7 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\DATA01.DBF';
#
# run the DUPICATE command
# specify client-side parameter file for auxiliary instance if necessary
DUPICATE TARGET DATABASE TO DUP
PFILE = 'D:\oracle\product\10.2.0\admin\DUP\pfile\initDUP.ora'
UNTIL scn 22753868
LOGFILE
GROUP 1 ('D:\oracle\product\10.2.0\oradata\DUP\redo01a.log') SIZE 20M REUSE ,
GROUP 2 ('D:\oracle\product\10.2.0\oradata\DUP\redo02a.log') SIZE 20M REUSE ,
GROUP 3 ('D:\oracle\product\10.2.0\oradata\DUP\redo03a.log') SIZE 20M REUSE ;
}

This fails with Errors:  这将失败,并显示以下错误
=======================

....
Starting DUPicate Db at 11-AUG-2006:14:20:47
Datafile 8 skipped by request
released channel: a1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of DUPicate Db command at 08/11/2006 14:20:52
RMAN-05501: aborting DUPication of target database
RMAN-05517: temporary file D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TEMP01.DBF conflicts with file used by target database

CHANGES

CAUSE

Cause:
======
RMAN-05517: temporary file string conflicts with file used by target database
Cause : RMAN attempted to use the specified temporary file as a restore destination in the auxiliary database, but this name was already in use by the target database.
原因:RMAN尝试将指定的临时文件用作辅助数据库中的还原目标,但是目标数据库已经使用了该名称。

Action: Use the SET NEWNAME FOR TEMPFILE command to specify a name for the indicated temporary file, making sure that the new name does not conflict with a filename in use by target database. Alternatively, use DB_FILE_NAME_CONVERT and retry the command.
操作:使用 SET NEWNAME FOR TEMPFILE 命令为指示的临时文件指定一个名称,确保新名称与目标数据库使用的文件名不冲突。或者,使用 DB_FILE_NAME_CONVERT 并重试该命令。

SOLUTION

Solution:  解决方案
=========
a) You must specify SET NEWNAME for 'tempfiles' as well like:  您必须为 'tempfiles' 指定SET NEWNAME,例如

RMAN> SET NEWNAME for tempfile 1 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\TEMP01.DBF';

b) or use DB_FILE_NAME_CONVERT

Example: Set NEWNAME (Change script and add NEWNAME for tempfile(s) like: )
--------

RMAN> run {
allocate auxiliary channel a1 device type disk ;
SET NEWNAME for datafile 1 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\SYSTEM01.DBF';
SET NEWNAME for datafile 2 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\UNDOTBS01.DBF';
SET NEWNAME for datafile 3 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\SYSAUX01.DBF';
SET NEWNAME for datafile 4 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\USERS01.DBF';
SET NEWNAME for datafile 5 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\EXAMPLE01.DBF';
SET NEWNAME for datafile 6 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\USERS02.DBF';
SET NEWNAME for datafile 7 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\DATA01.DBF'; SET NEWNAME for tempfile 1 to 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\DUP\TEMP01.DBF'; #
# run the DUPICATE command
# specify client-side parameter file for auxiliary instance if necessary
DUPICATE TARGET DATABASE TO DUP
PFILE = 'D:\oracle\product\10.2.0\admin\DUP\pfile\initDUP.ora'
UNTIL scn 22753868
LOGFILE
GROUP 1 ('D:\oracle\product\10.2.0\oradata\DUP\redo01a.log') SIZE 20M REUSE ,
GROUP 2 ('D:\oracle\product\10.2.0\oradata\DUP\redo02a.log') SIZE 20M REUSE ,
GROUP 3 ('D:\oracle\product\10.2.0\oradata\DUP\redo03a.log') SIZE 20M REUSE ;
}

最新文章

  1. jQuery get() 函数
  2. poj2486Apple Tree[树形背包!!!]
  3. sublime开发php必备工具集合(mac)
  4. ASP.NET 中通过Form身份验证 来模拟Windows 域服务身份验证的方法
  5. [book]awesome-machine-learning books
  6. 字符串反转实现(C++)
  7. DLL Export 报错
  8. UITextView换行问题解决办法
  9. OpenCV——CvMatchShapes函数
  10. 超级强悍的PHP代码编辑器PHPstorm及配置
  11. Sequelize 基本操作
  12. Java与算法之(8) - 堆排序
  13. burpsuite截断绕过前端限制上传一句话
  14. Linux(Redhat)安装Redis
  15. ansible 与 Jinja2的结合
  16. mysql老是停止运行该怎么解决
  17. ubuntu 安装 Sqlite 和 可视化工具 SqliteBroswer
  18. vue数据绑定方式:
  19. 基于t-io的MI工具实现
  20. LeetCode第[10]题(Java):Regular Expression Matching

热门文章

  1. 《Hands-On System Programming with Go》之目录操作
  2. springboot 读取 resource 下的文件
  3. linux源码安装mysql,shell编程学习,ubuntu
  4. ESP8266的RTOS版本ota在线升级基本流程及备忘
  5. ElementUI table 点击编辑按钮进行编辑实现示例
  6. 三个月前的评测拖延三个月仍旧是拳王No.1吗?YES!
  7. node.js安装本地模块遇到的目录锁定问题【新手问题】
  8. C# 打开文件/跳转链接
  9. MongoDB(一):NoSQL简介、MongoDB简介
  10. C++中的try throw catch 异常处理