Monday, May 12, 2008

Renaming Datafiles and Tempfiles in RMAN Duplicate Database

If you want to change the directory structure then there are several means of specifying new names to be used for the datafiles or tempfile of your duplicate database. They options are listed by order of precedence.

1)The SET NEWNAME FOR DATAFILE or SET NEWNAME FOR TEMPFILE command within a RUN block has the highest priority in order to rename a datafile or tempfile in the duplicate database.

2)The command CONFIGURE AUXNAME to specify new names for existing datafiles or tempfiles.

3)Specifying the DB_FILE_NAME_CONVERT parameter on the DUPLICATE command. In case of OMF it can't be used.

4)Setting the DB_FILE_NAME_CONVERT initialization parameter. In case of OMF it can't be used.

5)Setting the DB_CREATE_FILE_DEST initialization parameter to create OMF datafiles.

If you do not use any of the preceding options, then the duplicate database reuses the
original datafile locations from the target database.

With any of the 5 above option you can generate a new name of the datafile or tempfile. It may be the case that generated file name already exist in the location that you either specified or generated. In that case error will occur. You can avoid this error by specify DUPLICATE ...
NOFILENAMECHECK.

No comments:

Post a Comment