Sunday, December 13, 2015

ORA-19909: datafile 1 belongs to an orphan incarnation

Your MRP (Managed Recovery Process) may stop on your standby database with ORA-19909 error as can be seen in bellow excerpt from alert log file

Warning: Recovery target destination is in a sibling branch
of the controlfile checkpoint. Recovery will only recover
changes to datafiles.
Datafile 1 (ckpscn 8706894683401) is orphaned on incarnation#=1
MRP0: Background Media Recovery terminated with error 19909
Thu Apr 23 05:19:18 2015
Errors in file d:\oracle\1020\admin\prodb\bdump\proddb_mrp0_134344.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '+DATA/oradata/proddb/system01.dbf'

Thu Apr 23 05:19:18 2015
Managed Standby Recovery not using Real Time Apply
Thu Apr 23 05:19:19 2015
Errors in file d:\oracle\1020\admin\proddb\bdump\proddb_mrp0_134344.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '+DATA/oradata/proddb/system01.dbf'

Thu Apr 23 05:23:01 2015
SUCCESS: diskgroup ARCHDG was mounted
Thu Apr 23 05:23:01 2015
Primary database is in MAXIMUM PERFORMANCE mode

This error can have different reasons. In my case, I performed a test failover physical standby database and then revert it back to physical standby, but I missed a step during converting the database back to physical standby – the step was to execute command “ALTER DATABASE CONVERT TO PHYSICAL STANDBY”

Solution is to reset the incarnation of standby database to same as primary. You can use “list incarnation of database” command on primary to find out current incarnation of primary database and then follow the following steps to reset standby database’s incarnation to same as primary.
C:\Users\Administrator>rman

Recovery Manager: Release 10.2.0.4.0 - Production on Thu Apr 23 09:19:13 2015

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

RMAN> connect target /

connected to target database: PRODDB (DBID=2441588677, not open)

RMAN> list incarnation of database;

using target database control file instead of recovery catalog

List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       PRODDB    2441588677       PARENT  1          14-MAY-11
4       4       PRODDB    2441588677       ORPHAN  8702580384129 06-MAR-15
5       5       PRODDB    2441588677       ORPHAN  8702775998686 09-MAR-15
3       3       PRODDB    2441588677       ORPHAN  8702881829269 10-MAR-15
2       2       PRODDB    2441588677       CURRENT 8706832322629 22-APR-15

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       PRODDB    2441588677       CURRENT 1          14-MAY-11
4       4       PRODDB    2441588677       ORPHAN  8702580384129 06-MAR-15
5       5       PRODDB    2441588677       ORPHAN  8702775998686 09-MAR-15
3       3       PRODDB    2441588677       ORPHAN  8702881829269 10-MAR-15
2       2       PRODDB    2441588677       ORPHAN  8706832322629 22-APR-15


 Once done, MRP process started working fine again and started applying redo logs to the standby database.


No comments:

Post a Comment