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

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:
For the purposes of this document, in the following virtual environment as an example to describe the process
Primary Database:
DB_NAME: ORCL

Standby Database:
the DB_UNIQUE_NAME: DUP

 

Executing RMAN DUPicate, on same host as Target Database using SET NEWNAME to redirect datafiles to new location.
Execute RMAN DUPlicate in the target database resides on the host using the SET NEWNAME, to redirect the data file to a new location.

SET NEWNAME has been specified for all datafiles for example like following RMAN script:
have all the data files in the specified SET NEWNAME, for example, the following RMAN script:

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:   This will fail with the following error
=======================

....
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

In the Cause:
======
RMAN-05517: String a Conflicts with the Temporary File File Database Used by target
in the Cause: RMAN attempted Displays at The specified to use the Temporary File Restore AS A Where do you want in at The Auxiliary Database, But the this name already in use by at The WAS target database.
the reason: RMAN attempts to restore the temporary file specified as a secondary target in the database, but the target database already used that name.

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..
: Use SET NEWNAME FOR TEMPFILE temporary order directing the file a name, make sure the file name and the new name of the target database uses do not conflict. Alternatively, DB_FILE_NAME_CONVERT retry the command.

SOLUTION

Solution:   Solution
=========
A) by You for the MUST NEWNAME the Specify the SET 'tempfiles' Well like AS:   You must be a 'tempfiles' designated SET NEWNAME, for example,

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 ;
}

 

Guess you like

Origin www.cnblogs.com/zylong-sys/p/12003493.html
Recommended