Monday, August 10, 2009

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

Error :

===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ============

RMAN-00571: ===========================================================

RMAN-03002: failure of configure command at 05/12/2008 18:21:50

RMAN-06004: ORACLE error from recovery catalog database:
RMAN-20011: target database incarnation is not current in recovery catalog

Cause :

The database incarnation that matches the resetlogs change# and time of the mounted target database control file is not the current incarnation of the database .

In our case we cloned our database LGEIL as CRM and thus used “ reset database “ to reset the incarnation as per the new cloned CRM database . But after moving back to old database LGEIL , backup getting errored out with the error mentioned above ..

Details :

The above error occurs when the Database target Incarnation is not current in the Recovery Catalog.

The incarnation of a database is a number that is used to identify a version of the database.A database incarnation is created whenever you open the database with the RESETLOGS.

V$DATABASE_INCARNATION displays information about all database incarnations. Oracle creates
a new incarnation whenever a database is opened with the RESETLOGS option. Records about the
current and immediately previous incarnation are also contained in the V$DATABASE view.

To Reference the corresponding Incarnation information in the recovery catalog review the RC_DATABASE_INCARNATION and RC_DATABASE views.


à RC_DATABASE_INCARNATION lists information about all database incarnations registered in the recovery catalog.

àRC_DATABASE lists information about the databases registered in the recovery catalog. It corresponds to the V$DATABASE view in your target database.

Solution :

Connect to the RMAN schema as rman user e.g.

sqlplus rman/rman@EMREP

SQL> SELECT dbid, name, dbinc_key, resetlogs_change#, resetlogs_time FROM rc_database_incarnation WHERE dbid=1243244440 ORDER BY resetlogs_time;

DBID NAME DBINC_KEY RESETLOGS_CHANGE# RESETLOGS_TIME

---------- -------- ---------- ----------------- --------------------

1243244440 LGEIL 2812522 1 08-JUL-2007 06:09:28

1243244440 LGEIL 2812503 9.6778E+12 08-JUL-2007 07:11:27

1243244440 CRM 5026006 1.1191E+13 08-AUG-2009 21:02:00

Now , here our current incarnation is 5026006 (CRM ) and we have to change it to 2812503 ( LGEIL ) .

Incarnation time of your database ( LGEIL in our case ) can be confirmed from v$database ..

SQL> select RESETLOGS_TIME , RESETLOGS_CHANGE# , PRIOR_RESETLOGS_CHANGE# , PRIOR_RESETLOGS_TIME from v$database;

RESETLOGS_TIME RESETLOGS_CHANGE# PRIOR_RESETLOGS_CHANGE# PRIOR_RESETLOGS_TIME

-------------------- ------------------------ ---------------------------- --------------------

08-JUL-2007 07:11:27 9677807775711 1 08-JUL-2007 06:09:28

Here it’s “08-JUL-2007 07:11:27

Now , reset the incarnation …..

[csnetnorthdb:oracle] /northact/LGEIL/rman/scripts> rman target / catalog rman/rman@EMREP

Recovery Manager: Release 9.2.0.8.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: LGEIL (DBID=1243244440)

connected to recovery catalog database

RMAN> list incarnation;

No rows will be selected here ..

RMAN>

RMAN> RESET DATABASE TO INCARNATION 2812503;

database reset to incarnation 2812503 in recovery catalog

RMAN> resync catalog;

starting full resync of recovery catalog

full resync complete

RMAN> list incarnation;

List of Database Incarnations

DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time

------- ------- -------- ---------------- --- ---------- ----------

2812502 2812522 LGEIL 1243244440 NO 1 08-JUL-07

2812502 2812503 LGEIL 1243244440 YES 9677807775711 08-JUL-07

2812502 5026006 CRM 1243244440 NO 11190641794400 08-AUG-09

Now ..you can take the backup

No comments: