Pages

Friday, July 23, 2021

ORA-19909: datafile 1 belongs to an orphan incarnation

 Problem :

RMAN> RECOVER DATABASE FROM TAG STANDBY_24062021; 
Starting recover at 26-JUN-21 allocated channel: 
ORA_DISK_1 channel ORA_DISK_1: SID=701 device type=DISK starting media recovery media recovery failed 
RMAN-00571: =========================================================== 
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 06/26/2021 00:03:23 
ORA-00283: recovery session canceled due to errors 
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed standby start 
ORA-00283: recovery session canceled due to errors 
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/oracle/EHS/sapdata1/system_1/system.data1'

Solution :

Find out incarnation details from both DC and DR databases. 

At Primary Database

        RMAN> list incarnation of database; 

List of Database Incarnations 

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time 
------- ------- -------- ---------------- --- ---------- ---------- 
1 1 PEP 2473586590 CURRENT 1 29-APR-14 
2 2 PEP 2473586590 ORPHAN 8252951530 25-JUN-17 

At Standby Database

    RMAN> list incarnation of database; 

List of Database Incarnations 

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time 
------- ------- -------- ---------------- --- ---------- ---------- 
1 1 EHS 2473586590 PARENT 1 29-APR-14 
2 2 EHS 2473586590 ORPHAN 8252951530 25-JUN-17 
3 3 EHS 2473586590 CURRENT 22946868559 09-AUG-20

You can see from above data that Primary and Standby database are on different incarnation (Statue: CURRENT). You have to change standby database incarnation to match DC incarnation. 

 In our case below command will work: 

At Standby database

        RMAN> reset database to incarnation 1; 

database reset to incarnation 1 

        RMAN> list incarnation of database; 

List of Database Incarnations 

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time 
------- ------- -------- ---------------- --- ---------- ---------- 
1 1 EHS 2473586590 CURRENT 1 29-APR-14 
2 2 EHS 2473586590 ORPHAN 8252951530 25-JUN-17 
3 3 EHS 2473586590 ORPHAN 22946868559 09-AUG-2

No comments:

Post a Comment