Thursday, September 2, 2021

RMAN-20011: target database incarnation is not current in recovery catalog

 
After some research, we came across Note 412113.1 on http://metalink.oracle.com, which pointed towards the possibility of some non-prod instance getting registered with RMAN catalog with the same DBID as production’s.

In addition, Notes 1076158.6 and 1061206.6 were also *probably* relevant, but the relevance was not striking

SQL> select db_key,DBID,name,current_incarnation from rc_database_incarnation order by 1;


So, in reality, what had happened was that the reincarnation of DR PROD instance had been setup in the rman catalog.

To undo this, we reset the database incarnation to the catalog using the RESET INCARNATION TO DBKEY and then did a manual resync of catalog using the rman RESYNC CATALOG command.


If backups are falling  due to said reason 

Reset PROD to previous incarnation
 1. Check the latest incarnation key for production database in rc_database_incarnation
  select DBID,NAME,DBINC_KEY,  RESETLOGS_CHANGE#, RESETLOGS_TIME   
  from rc_database_incarnation
  where dbid=2284119847;

       ==> Check the DBINC_KEY corresponding to the current incarnation of PROD database
    
2. Connect to the production database with RMAN
     rman catalog <un/pw@catalog_db> target /

     RMAN> reset database to incarnation <dbinc_key>; <<< From step 1
     Or 
     RMAN>    RESET DATABASE;
RMAN> unregister database;
   RMAN> register database;


    RMAN> resync catalog;
    RMAN> list incarnation; => Now the production DB incarnation should be the current one





Reference : 
Target Database Incarnation Is Not Current In Recovery Catalog RMAN-20011 (Doc ID 412113.1)
RMAN restore database fails with RMAN-20011, Target Incarnation Is Not Current (Doc ID 394493.1)

No comments:

Post a Comment