Skip to Main Content
  • Questions
  • apply archive logs through OPEN RESETLOGS

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, lin.

Asked: October 23, 2017 - 1:33 pm UTC

Last updated: October 26, 2017 - 1:12 am UTC

Version: 11.2.0

Viewed 1000+ times

You Asked

Hello Tom

I am a little confused about following excerpt from "Backup and Recovery User's Guide":

Because the database does not apply an archived redo log to a data file unless the RESETLOGS SCN and time stamps match, the RESETLOGS requirement prevents you from corrupting data files with archived logs that are not from direct parent incarnations of the current incarnation.

In my understanding, it means
- if resetlogs scn and timestamp from an archived redo log do not match that of a data file, the redo log cannot be applied to that data file

But direct parent incarnations also have different resetlogs scns and timestamps (each incarnation introduces new resetlog scn and timestamp), how can they be eligible to be applied to current incarnation? Did I miss anything?

and Connor said...

The key is this: (from the docs)

https://docs.oracle.com/database/122/BRADV/user-managed-recovery-advanced.htm#BRADV225

"You can recover backups through an OPEN RESETLOGS operation so long as:
- You have a current, backup, or created control file that detects prior incarnations
- You have all available archived redo logs"

So the control file has details of:

- incarnation "1", and its archives
- incarnation "2", and its archives
and so forth.

So if you restore a database back to incarnation "1", then the control file can 'tell' the recovery to roll through the archives for incarnation 1, and then proceed onto incarnation 2 and continue with those archive logs.

You are correct that if you don't have this information in the controlfile (or do not have a means of resurrecting it), then once you start attempting recoveries with incorrect incarnations you'll run into problems.

Gavin Soorma has a nice blog post on it here

https://gavinsoorma.com/2011/10/recovery-through-resetlogs-and-reset-of-the-incarnation-of-the-database/


Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Lin Yuan, October 26, 2017 - 6:28 am UTC

Very clear! Thank you Tom!

A reader, October 26, 2017 - 6:31 am UTC


More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database