ORA-19909: datafile 1 belongs to an orphan incarnation


When i was tried to restored the backup i found below error  message
RMAN-03002: failure of recover command at 05/29/2019 15:35:47
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: '/oradbf1/oradata/ctsdb/system01.dbf'

Primary and standby have different incarnations:

standby db:

RMAN> list incarnation of database;
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       CTSDB    193365640        PARENT  1          31-JAN-17
2       2       CTSDB    193365640        PARENT  1290897    14-AUG-18
3       3       CTSDB    193365640        PARENT  12170040   06-OCT-18
4       4       CTSDB    193365640        CURRENT 26020984   17-NOV-18

primary db:

RMAN> list incarnation of database;
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       CTSDB    193365640        PARENT  1          31-JAN-17
2       2       CTSDB    193365640        PARENT  1290897    14-AUG-18
3       3       CTSDB    193365640        CURRENT 12170040   06-OCT-18

Solution:

You need to reset the standby database's incarnation to match the primary's:

-- in standby:

list incarnation of database;
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       CTSDB    193365640        PARENT  1          31-JAN-17
2       2       CTSDB    193365640        PARENT  1290897    14-AUG-18
3       3       CTSDB    193365640        PARENT  12170040   06-OCT-18
4       4       CTSDB    193365640        CURRENT 26020984   17-NOV-18

RMAN> reset database  to incarnation 3;

database reset to incarnation 3

RMAN> list incarnation of database;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       CTSDB    193365640        PARENT  1          31-JAN-17
2       2       CTSDB    193365640        PARENT  1290897    14-AUG-18
3       3       CTSDB    193365640        CURRENT 12170040   06-OCT-18
4       4       CTSDB    193365640        ORPHAN  26020984   17-NOV-18

RMAN> catalog start with "/oradbf2";

searching for all files that match the pattern /oradbf2

List of Files Unknown to the Database

=====================================
File Name: /oradbf2/oradata/CTSDR/onlinelog/o1_mf_6_fvjoz561_.log
File Name: /oradbf2/oradata/CTSDR/onlinelog/o1_mf_3_fvjoz2jq_.log
File Name: /oradbf2/oradata/CTSDR/onlinelog/stndby1.log

RMAN> restore archivelog from sequence 1109 until sequence 1436;

channel ORA_DISK_1: failover to piece handle=/oradbf2/rman/archivelog3150.bkp tag=TAG20190529T144019
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 29-MAY-19
RMAN> exit

-- Verify standby database status and role

SQL> select name,open_mode ,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
PROD      MOUNTED              PHYSICAL STANDBY

Comments

Popular posts from this blog

RMAN-08137: WARNING: archived log not deleted

steps to setup rman

Enabling Archive log