Home / Oracle DBA / SMON’s instance recovery with example

SMON’s instance recovery with example

SMON’s instance recovery with example

EXAMPLE : 1
EXAMPLE 1
  • In the above diagram, assume that 1,2 and 3 transactions are commited and 4 is going on. Also as checkpoint occurred at log switch, complete data of 1 and 2, also part of 3 were written to datafiles
  • Assume LGWR is writing to second file for transaction 4 and instance crash occurred.
  • While recovery, SMON will start comparing the SCN between data file header and redo log file. Also it will check for commit point.
  • In the above example, 1 & 2 are written and commited. So nothing is there to recover. But for 3, only half data is written. To write other half, SMON will initiate DBWRn. But DBWRn will be unable to do that as dirty blocks are cleaned out from write list. (due to instance restart)
  • Now DBWRn will take help of server process which will actually generate dirty blocks with the help of redo entries that are already written to redolog files.
EXAMPLE : 2

EXAMPLE 2

  • In the above example, transaction 3 is not yet commited, but because log switch occurred and checkpoint event triggred, part of its data is written to datafiles.
  • Assume an instance crash occurred and SMON is performing instance recovery.
  • SMON will start comparing SCN as usual and when comes to 3 it identifies that data is written to datafiles, but actually 3 is not committed. So this data need to be reverted. Again it will ask DBWRn to take this job.
  • DBWRn in turn takes help from server process which will generated blocks with old values with the help of undo tablespace.
Note : For roll forward, redo entries from redolog files will be used where as in rollback before images from undo tablespace will be used.
Read More:
OPERATING SYSTEM FUNCTIONALITY THEORY
Upgrading to Oracle Database 10G to 11G
Creating a Physical Standby Database – Data Gaurd
DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.

Check Also

Oracle 10g to 11g Enhancements (Difference between Oracle 10g and 11g)

Difference between Oracle 10g and 11g 1- Enhanced Automatic Memory Management System Oracle 9i automated …

Leave a Reply

Your email address will not be published. Required fields are marked *

DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.
close-link
GET OUR LATEST CONTENT IN YOUR INBOX

SUBSCRIBE 
Your information will never be shared
close-link
Enquiry
Submit
close-link
Sign-up for exclusive content. Be the first to hear about DBA Centre Blogs.
Subscribe