Friday, March 30, 2018

Difference between instance recovery and media recovery?

Difference between instance recovery and media recovery?

archives = media recovery - only.
online redo logs = crash recovery 
 
Instance recovery is done after an instance fails, it requires only the ONLINE REDO logs. It is also known as "crash recovery" in some cases. After applying all the changes from the redo logs (roll forward), any uncommitted transactions are undone (rollback). So after recovery is complete, you only have data from transactions committed before the crash. If you shutdown abort and then startup, you'll do an instance recovery, it requires the online redo logs only.


Media recovery is when you restore a file from backup. The scenario is that the media (disk) that the datafile was on has broken. You cannot access that datafile anymore. So, you go to your backups and find an old copy of that datafile. You restore it to a new disk and then apply all of the archived redo logs that were generated since you backed up that file AND THEN we apply the online redo log files to it to catch it up to the rest of the database.

Note:
We do not ever use archives for instance recovery. We only use archives for media recovery
 

No comments:

Post a Comment