Database Incarnations

  • From: Dave Morgan <oracle@xxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 2 Feb 2021 11:26:23 -0700

Hello All,
    I have a question about where the database stores Incarnation data. The background: As a hot backup my client uses
archive log shipping and application to a database that is not open, but is mounted. On Windows using 11.2.0.3

During a series of hardware failures we failed over, were still impacted by the underlying issue and so re-opened the original
copy. Since this is in 11.2.0.3 the failure required an open database resetlogs despite full recovery being performed (known bug)

Once life is good again I have to rebuild the hot standby. I do this by blowing it away completely (datafiles, redo, control files) and
perform a controlfile restore and then a database restore. At this time when  I try to apply archivelog files it says "Sorry
your system file 0001 is from an orphan incarnation". Sure enough the hot standby is +1 ahead of production. The fix is trivial but
how does the database know this? The manual says V$DATABASE displays information from the control file but the control file is
from production which knows nothing about the extra open and incarnation on the hot backup.

|RECOVERY_TARGET_INCARNATION# |Incarnation number where all data files are recovered by the |RECOVER DATABASE| command
|LAST_OPEN_INCARNATION#| Record number of the incarnation in |V$DATABASE_INCARNATION| that was last opened successfully --

I can find no information on where v$database_incarnation gets its data and the only table with INCARNATION in its name is
RECENT_RESOURCE_INCARNATIONS$ which has NULL for TABLESPACE_NAME in DBA_TABLES.

If it's not in any tablespace, and not in the controlfile where is it stored?

Any ideas or even better knowledge?

TIA
Dave

Dave Morgan
Senior Consultant, 1001111 Alberta Limited
dave.morgan@xxxxxxxxxxx
403 399 2442

Other related posts:

  • » Database Incarnations - Dave Morgan