Let’s start with the definitions of these Recovery Manager errors

RMAN-05502: the target database must be mounted when issuing a DUPLICATE command RMAN-05500: the auxiliary database must be not mounted when issuing a DUPLICATE command

In Oracle’s database duplication, who is the target? The Target is actually the source database that you are trying to duplicate. The auxiliary is the destination. Thus when establishing a connection for the purpose for configuring Oracle Dataguard for example you must connect to BOTH instances in one statement:

rman target=sys/******@TARGETSID auxiliary=sys/******@AUXSID

It is very important to realise that you are connected TWO databases in ONE RMAN session thus any command you issue affects BOTH. For example suppose you issue a dumplicate command as below:

RMAN > duplicate target database for standby ;

and get this error:

RMAN-05001 auxiliary filename /usr/datafile/users03.dbf conflicts with a file used by the target database

This occurs because you have not used DB_FILE_NAME_CONVERT in your parameter file and your data files are on the same path in both TARGET and AUXILLIARY. You then decide you need to circumvent this this by add the NOFILENAMECHECK clause since you want to maintain the uniform paths and overwrite the AUX database. To start all over again you shutdown the instance(s) from the same RMAN session! Big MISTAKE! You just shutdown your LIVE database.

This results in the confusing scenario where you attempt the duplicate command again and get:

RMAN-05502: the target database must be mounted when issuing a DUPLICATE command

You issue alter database mount: in the very same RMAN session and try the duplication command again and then get:

RMAN-05500: the auxiliary database must be not mounted when issuing a DUPLICATE command

LESSONS:

  • Be careful when issuing shutdown database form RMAN

  • Understand who the TARGET is and who the AUXILLIARY is

Leave A Comment

Your email address will not be published. Required fields are marked *