需要用到的技术:incarnation reinstated
DGMGRL> reinstate database zhztpri
Reinstating database "zhztpri", please wait...
Error: ORA-16653: failed to reinstate databaseFailed.
Reinstatement of database "zhztpri" failed
DGMGRL> enable database zhztpri
Error: ORA-16661: the standby database needs to be reinstatedFailed.
、
DGMGRL> show configuration
Configuration - zwyw
Protection Mode: MaxPerformance
Databases:
zhztstb - Primary database
zhztpri - Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstatedFast-Start Failover: DISABLED
Configuration Status:
SUCCESSDGMGRL> reinstate database zhztpri
Reinstating database "zhztpri", please wait...
Reinstatement of database "zhztpri" succeeded
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 ZWYWDB 1299176841 PARENT 1 24-AUG-13
2 2 ZWYWDB 1299176841 PARENT 925702 22-JAN-18
3 3 ZWYWDB 1299176841 PARENT 16071537874549 15-SEP-18
4 4 ZWYWDB 1299176841 CURRENT 16221023157093 07-DEC-18RMAN> reset database to incarnation 3;
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 ZWYWDB 1299176841 PARENT 1 24-AUG-13
2 2 ZWYWDB 1299176841 PARENT 925702 22-JAN-18
3 3 ZWYWDB 1299176841 CURRENT 16071537874549 15-SEP-18
4 4 ZWYWDB 1299176841 ORPHAN 16221023157093 07-DEC-18RMAN> reset database to incarnation 4;
database reset to incarnation 4
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 ZWYWDB 1299176841 PARENT 1 24-AUG-13
2 2 ZWYWDB 1299176841 PARENT 925702 22-JAN-18
3 3 ZWYWDB 1299176841 PARENT 16071537874549 15-SEP-18
4 4 ZWYWDB 1299176841 CURRENT 16221023157093 07-DEC-18
Errors in file /u01/app/oracle/diag/rdbms/zhztpri/zwywdb/trace/zwywdb_ora_9017.trc:
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: '/u01/app/oracle/oradata/zwywdb/system01.dbf'
Errors in file /u01/app/oracle/diag/rdbms/zhztpri/zwywdb/trace/zwywdb_pr00_10742.trc:
ORA-19906: recovery target incarnation changed during recovery