Home » Oracle » Oracle Database » How to correct Oracle RMAN-20004 Backup failure

How to correct Oracle RMAN-20004 Backup failure

RMAN-20004 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

Even if you try to list backup from Production database connecting catalog, you will get the error

RMAN> LIST BACKUP;
RMAN-00571: ==============
RMAN-00569: ======= ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: =========================
RMAN-03002: failure of list command at 11/10/2019 6:22:33
RMAN-06004: ORACLE error from recovery catalog database
RMAN-20004: target database name does not match name in recovery catalog

The error RMAN-20004  happens,as clone instance replaces the prod instance in the catalog.
Following queries could be used to confirm this

This will provide PROD DBID

Select dbid,name from v$database ;   

This query in catalog will provide the dbid information.It will shows clone registered instead of production with same DBID

Select dbid,name ,DBINC_KEY,RESETLOGS_CHANGE# from rc_database ; 

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 and you should be able backup the Production database using catalog and use the other RMAN command also.

Please take appropriate backup of catalog before attempting any thing.

If the clone database backup is also required, Please change the DBID of the clone database using NID utility first and then confirm if the DBID has changed in the clone database. Then you can connect with the catalog and take the backup of clone database also . You should not be receiving any errors while taking backup of both the production and clone database. Read about NID utility.

See also  RMAN DUPLICATE DATABASE CLONING WITH ACTIVE DATABASE

NID utility

You can read more about RMAN utility at the below links

  • Oracle RMAN interview questions :Oracle RMAN Interview Questions are must for Oracle DBA’s looking for change. Oracle Backup and recovery is one of the essential duties of Oracle DBA
  • RMAN backup commands :Check out the RMAN Backup commands in this post. This is going to be very helpful for the person who is involved in backup and recovery
  • RMAN cheat sheet : Useful and Helpful Downloadable Oracle RMAN cheat sheet
  • Oracle support Note
  • RMAN-06059 : Check out how to resolve the RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
  • ORA-00245 : Snapshot controlfile is a new feature in RMAN for resynchronizing. Important changes with it from 11gR2 and how to resolve the error ORA-00245

Leave a Comment

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

Scroll to Top