标题: RMAN DUPLICATE DATABASE with SET NEWNAME failed: RMAN-05501 RMAN-05517 [打印本页] 作者: 刘泽宇 时间: 2023-6-10 23:20 标题: RMAN DUPLICATE DATABASE with SET NEWNAME failed: RMAN-05501 RMAN-05517 SYMPTOMS
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
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.
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.
SOLUTION
=========
a) You must specify SET NEWNAME for 'tempfiles' as well like:
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';