RMAN-06004: ORACLE error from recovery catalog database: RMAN-20020: database incarnation not set
When we try to back the resync the catalog with the target database if we get this message then we have to reset the database to set the incarnation to the current
it can be cauased when we open the database with reset logs or if the upgrade the catalog and connect with the target database
The database incarnations are used to identify the database backup belongs to which period .. for ex. day 1 when we take the back of the database then a incarnation will be generated and stored .. if we restore the database and the open it again then the new incarnation number will be generated .. now if we want to restore the backup which is take on the day one then we must set the database incarnation to the first incarnation number by using the RESET DATABASE TO INCARNATION the database control file will also hold the incarnation number in it
Step 1
connect to rman and connect to the target database with recovery catalog
[ora@fa ~]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 14 13:35:00 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 14 13:35:00 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target /
connected to target database: <SID> (DBID=<database_id>)
connected to target database: <SID> (DBID=<database_id>)
RMAN> connect catalog rcat/<password>@<catalog database service name>
connected to recovery catalog database
connected to recovery catalog database
Step2
RMAN> resync catalog
2> ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 05/14/2013 13:36:02
RMAN-20020: database incarnation not set
2> ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 05/14/2013 13:36:02
RMAN-20020: database incarnation not set
RMAN> backup datafile <file_number>;
Starting backup at 14-MAY-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 05/14/2013 13:37:14
RMAN-03014: implicit resync of recovery catalog failed
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20020: database incarnation not set
Starting backup at 14-MAY-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 05/14/2013 13:37:14
RMAN-03014: implicit resync of recovery catalog failed
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20020: database incarnation not set
Step 3
once you got the incarnation not set check the list of incarnation the database has
RMAN> list incarnation ;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
29 360 FAHDB 728861041 PARENT 1 05-MAR-12
29 361 FAHDB 728861041 PARENT 14640435 08-JUN-12
29 98 FAHDB 728861041 PARENT 14882874888 22-JUN-12
29 30 FAHDB 728861041 ORPHAN 15574861795 11-JUL-12
29 321 FAHDB 728861041 CURRENT 15996977185 22-AUG-12
1 17 ORACAT 2821584587 PARENT 1 05-SEP-10
1 2 ORACAT 2821584587 CURRENT 972274 12-MAY-13
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
29 360 FAHDB 728861041 PARENT 1 05-MAR-12
29 361 FAHDB 728861041 PARENT 14640435 08-JUN-12
29 98 FAHDB 728861041 PARENT 14882874888 22-JUN-12
29 30 FAHDB 728861041 ORPHAN 15574861795 11-JUL-12
29 321 FAHDB 728861041 CURRENT 15996977185 22-AUG-12
1 17 ORACAT 2821584587 PARENT 1 05-SEP-10
1 2 ORACAT 2821584587 CURRENT 972274 12-MAY-13
SQL> select * from v$controlfile_record_section where TYPE ='DATABASE INCARNATION';
TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID
---------------------------- ----------- ------------- ------------ ----------- ---------- ----------
DATABASE INCARNATION 56 292 4 1 4 4
we can check the no of database incarnations in the database control file ...
TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID
---------------------------- ----------- ------------- ------------ ----------- ---------- ----------
DATABASE INCARNATION 56 292 4 1 4 4
we can check the no of database incarnations in the database control file ...
Step 4
To sync the incarnation number with the catalog issue the Reset the database command in the rman
and test the backup
RMAN> reset database;
database incarnation already registered
RMAN> backup datafile 3;
Starting backup at 14-MAY-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4256 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/fahdb/datafile/<datafile_number>
channel ORA_DISK_1: starting piece 1 at 14-MAY-13
channel ORA_DISK_1: finished piece 1 at 14-MAY-13
piece handle=+FLASH/fahdb/backupset/2013_05_14/nnndf0_tag20130514t135843_0.282.815407125 tag=TAG20130514T135843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 14-MAY-13
Starting Control File and SPFILE Autobackup at 14-MAY-13
piece handle=+FLASH/fahdb/autobackup/2013_05_14/s_815407132.326.815407133 comment=NONE
Finished Control File and SPFILE Autobackup at 14-MAY-13
database incarnation already registered
RMAN> backup datafile 3;
Starting backup at 14-MAY-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4256 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/fahdb/datafile/<datafile_number>
channel ORA_DISK_1: starting piece 1 at 14-MAY-13
channel ORA_DISK_1: finished piece 1 at 14-MAY-13
piece handle=+FLASH/fahdb/backupset/2013_05_14/nnndf0_tag20130514t135843_0.282.815407125 tag=TAG20130514T135843 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 14-MAY-13
Starting Control File and SPFILE Autobackup at 14-MAY-13
piece handle=+FLASH/fahdb/autobackup/2013_05_14/s_815407132.326.815407133 comment=NONE
Finished Control File and SPFILE Autobackup at 14-MAY-13
RMAN> resync catalog ;
starting full resync of recovery catalog
full resync complete
starting full resync of recovery catalog
full resync complete
No comments:
Post a Comment