ORA-01203: wrong incarnation of this file – wrong creation SCN

Like in everyone else’s life, this kind of “happiness” is happening. This is what I got on one of my test STANDBY databases while I was trying to start the Recovery Manager:

Managed Standby Recovery starting Real Time Apply
Read of datafile '/u01/oradata/DB/filename.dbf' (fno 113) header failed with ORA-01203
Rereading datafile 113 header failed with ORA-01203
MRP0: Background Media Recovery terminated with error 1110
Errors in file /u01/app/oracle/diag/rdbms/standby/DB/trace/DB_pr00_13353.trc:
ORA-01110: data file 113: '/u01/oradata/DB/"'
ORA-01122: database file 113 failed verification check
ORA-01110: data file 113: '/u01/oradata/DB/filename.dbf'
ORA-01203: wrong incarnation of this file - wrong creation SCN
Managed Standby Recovery not using Real Time Apply
Slave exiting with ORA-1110 exception

These are the steps I used to make it work:

On STANDBY I have removed the file in trouble “filename.dbf”. Because I had this problem for about a week and the recovery manager was down…some other (new) datafiles were not created so the standby control file was outdated. I have recreated the standby controlfile on the PRIMARY and send it to STANDBY:

alter database create standby controlfile as '/tmp/stdby_controlfile_DB.ctl' reuse;

I’ve stopped the STANDBY and mounted it using the NEW / updated standby controlfile.

Now, I used RMAN on the PRIMARY and connected on the auxiliary STANDBY to restore the “filename.dbf” which was corrupted and also the datafiles that were missing like this:

[oracle@dbserver]$ rman target / auxiliary sys/password@DB_STANDBY

Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 16 09:03:27 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: DB 
connected to auxiliary database: DB (not open)

RMAN> backup as copy datafile 116 auxiliary format '/u01/oradata/DB/filename.dbf';

Starting backup at 16-MAY-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=6309 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00116 name=/u01/oradata/DB/filename.dbf
output file name=/u01/oradata/DB/filename.dbf tag=TAG20170516T090344
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 16-MAY-17

RMAN> exit

 

Now on the STANDBY site, you just need to start the Recovery Manager and you’re done:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

 

Advertisements