How to correct error RMAN-20004



Last updated on December 21st, 2015 at 04:14 am

Problem:When Recovery catalog has been configured.and Production Database has been cloned and a connection has been made from the clone to Catalog database using rman with out changing the DBID of the clone,then we are in some trouble

Then when you try to backup the production instance with the catalog,The backup fails with following error

RMAN-06004: ORACLE error from recovery catalog database
RMAN-20004: target database name does not match name in recovery catalog

This errors happens,as clone instance replaces the prod instance in the catalog.
Following queries could be used to confirm this

Select dbid,name from v$database ; —> This will provide PROD DBID
Select dbid,name ,DBINC_KEY,RESETLOGS_CHANGE# from rc_database ; –> This query in catalog will provide the dbid information.It will shows clone registered instead of production with same DBID

Solution:If clone backup are not required in catalog,Do this
connect to catalog from clone and fire the command
unregister database

Then connect to catalog from Production
register database.

Hopefully the problem should resolve

Please take appropiate backup of catalog before attempting any thing.

If the clone backup is required, Please change the DBID of the clone database using NID

NID utility


Leave a Reply