You are just 10 steps away from becoming a Oracle DBA. Materialize your dream by following the The 10 Simple Steps .
PREVIOUS CHAPTER | NEXT CHAPTER
PREVIOUS CHAPTER | NEXT CHAPTER
Types of Oracle Recovery
Learn Oracle - Highlights
Learn Oracle - Instance and Crash Recovery
Crash recovery is used to recover from a failure either when a single-instance database crashes or all instances of an Oracle Real Application Clusters database crashes. Instance recovery refers to the case where a surviving instance recovers a failed instance in an Oracle Real Application Clusters database.
The goal of crash and instance recovery is to restore the data block changes located in the cache of the dead instance and to close the redo thread that was left open. Instance and crash recovery use only online redo log files and current online datafiles. Oracle recovers the redo threads of the dead instances together.
Crash and instance recovery have the following shared characteristics:
Oracle performs this recovery automatically on two occasions:
- Redo the changes using the current online datafiles (as left on disk after the crash or SHUTDOWN ABORT)
- Use only the online redo logs and never require the use of the archived logs
- Have a recovery time governed by the number of dead instances, amount of redo generated in each dead redo thread since the last checkpoint, and by user-configurable factors such as the number and size of redo log files, checkpoint frequency, and the parallel recovery setting
The important point is that in both crash and instance recovery Oracle applies the redo automatically: no user intervention is required to supply redo logs. However, Oracle DBA can set parameters in the database server that can tune the duration of instance and crash recovery performance. Also, Oracle DBA can tune the rolling forward and rolling back phases of instance recovery separately. Finally, Oracle DBA can tune checkpointing so that recovery time is optimized.
- At the first database open after the crash of a single-instance database or all instances of an Oracle Real Applications Cluster database (crash recovery). After a normal shutdown, Oracle sets a flag in the control file. Oracle performs crash recovery automatically at startup upon detecting that an instance did not set a flag in the control file indicating a normal shutdown.
- When some but not all instances of an Oracle Real Application Clusters configuration fail (instance recovery). The recovery is performed automatically by a surviving instance in the configuration.
Back to Top
Learn Oracle - Media Recovery
Media recovery is divided into the following types:
Typically, the term "media recovery" refers to recovery of datafiles. Block media recovery is a more specialized operation that Oracle DBA can only perform with RMAN.
- Datafile media recovery
- Block media recovery
Learn Oracle - Datafile Media Recovery
Datafile media recovery is used to recover from a lost or damaged current datafile or control file. It is also used to recover changes that were lost when a tablespace went offline without the OFFLINE NORMAL option. Datafile media recovery and instance recovery have in common the requirement to repair database integrity. However, these types of recovery differ with respect to their additional features. Media recovery has the following characteristics:
The database cannot be opened if any of the online datafiles needs media recovery, nor can a datafile that needs media recovery be brought online until media recovery has been executed. The following scenarios necessitate media recovery:
- Applies needed changes using restored backups of damaged datafiles.
- Can use archived logs as well as the online logs.
- Requires explicit invocation by a user.
- Does not detect media failure (that is, the need to restore a backup) automatically. After a backup has been restored, however, detection of the need to recover it through media recovery is automatic.
- Has a recovery time governed solely by user policy (for example, frequency of backups, parallel recovery parameters) rather than by Oracle internal mechanisms.
Unless the database is not open by any instance, datafile media recovery can only operate on offline datafiles. Oracle DBA can initiate datafile media recovery before opening a database even when crash recovery would have sufficed. If so, crash recovery still runs automatically at database open.
- Oracle DBA restore a backup of a datafile.
- Oracle DBA restore a backup control file (even if all datafiles are current).
- A datafile is taken offline (either by Oracle DBA or automatically by Oracle) without the OFFLINE NORMAL option.
Note that when a file requires media recovery, you must perform media recovery even if all necessary changes are contained in the online logs. In other words, you must still run recovery even though the archived logs are not needed. Media recovery may find nothing to do -- and signal the "no recovery required" error -- if invoked for files that do not need recovery.
Learn Oracle - Block Media Recovery
Block media recovery is a technique for restoring and recovering individual data blocks while all database files remain online and available. If corruption is limited to only a few blocks among a subset of database files, then block media recovery may be preferable to datafile recovery.
The interface to block media recovery is provided by RMAN. If Oracle DBA do not already use RMAN as your principal backup and recovery solution, then you can still perform block media recovery by cataloging into the RMAN repository the necessary user-managed datafile and archived redo log backups.
Back to Top
More Tutorials on Oracle dba ...
Liked it ? Want to share it ? Social Bookmarking
Source : Oracle Documentation |
Want to share or request Oracle Tutorial articles to become a Oracle DBA. Direct your requests