René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -

Media Recovery

Datafile media recovery is sometimes alse called media recovery.
Datafile media recovery is used to recover from a damaged (or lost) datafile, control file or spfile. The goal of datafile media recovery is to restore database integrity.
In order for a datafile to be able to be recovered, either:
  • The database is not open, or
  • The datafile is offline
A datafile that needs media recovery cannot be brought online. A database cannot be opened if any of the online datafiles need media recovery.
A media recovery sort of replays the redo generated to a restored block to make that block as of a certain time. Recovery of a datafile always begins with the lowest SCN recorded in the datafile header.

Differences to crash recovery

Datafile media recovery differs from crash recovery in the following points:
  • Oracle will not initiate media recovery on its own, it must be explicetly demanded by a DBA.
  • It will restore a datafile saved away in a backup. Crash recovery recovers a datafile that was left by a crash.
  • Media recovery uses uses both archived redo logs and online redo log to recover. Crash recovery only needs the redo logs.

Causes for media recovery

  • A datafile off a backup is restored
  • A backed up control file is restored
  • A datafile is taken offline without the offline normal option.