RMAN-20020: database incarnation not set

Quando tentamos fazer a ressincronização do catálogo com o banco de dados de destino, se recebermos a menssagem RMAN-20020: database incarnation not set, então temos que redefinir o banco de dados para definir a encarnação para o atual.

 
Step 1
connect to  rman and connect to the target database with recovery catalog
rman
Recovery Manager: Release 11.2.0.4.0 - Production 
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
 
connect target /
connected to target database: <SID> (DBID=<database_id>)
 
connect catalog rman/<password>@<catalog database service name>
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

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

Step 3
once you got the incarnation not set check the list of incarnation the database has

 list incarnation ;
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
29      360     ZMDB    728861074        PARENT  1          05-MAR-18
29      361    ZMDB    728861074       PARENT  14640435   08-JUN-18
29      98      ZMDB   728861074        PARENT  14882874888 22-JUN-18
29      30      ZMDB   728861074        ORPHAN  15574861795 11-JUL-18
29      321    ZMDB    728861074       CURRENT 15996977185 22-AUG-18


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 ...

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

RMAN> resync catalog ;
starting full resync of recovery catalog
full resync complete
 

 

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *