Thursday, May 8, 2008

Read Carefully

Frequently it happens that while reading we ignore many things. Many times it just works but we should know what we are ignoring. A couple of weeks ago I had an interview for the post of Oracle DBA. I was really excited and was pretty much confident. In the session the person who was interviewing me asked the question that what is Instance Recovery and when and why it is done. In explaining my answer I said that when the changes of a committed transaction left uncommitted due to power failure or whatever then on next startup the SMON background process does the Instance Recovery and applies the changes of the committed transactions. The very next question was then what does the commit do?

He further explained the question that when you issue the commit command and you get reply of commit completed, then why the changes are not saved for the transaction. The question confused me at first but after a couple of minutes I figured out that commit only forces the writing of redo logs back to redo log files. It does not force the DBWR to write back to database files. So it ensures the data consistency without actually writing to the data files.

The point is that I have come through this concept multiple times but just not thinking about it caused confusion in my mind, although temporarily. Just early this morning I read it again and remembered the confusion that I encountered. So the tip of the day is to read, read, and read carefully.

No comments:

Post a Comment