Oracle Consistent Readgreenspun.com : LUSENET : DBAzine : One Thread
Dear Oracle Gurus,
I am very confuse about how oracle maintains the read consistency among the different sessions.Please tell me - once a user is logged in, will oracle give him the CURRENT SCN? How and when SCN is generated? How oracle knows which information/data should pick for which session?
I tried to find out the answers of these questions from Oracle Doc ,metalinks and other sites but unable to get it. I will be highly obliged if some one can answers to these questions in details.
-- Gaurav Sharan Gupta (firstname.lastname@example.org), January 02, 2004
Welcome to the world of Oracle! One precept form Oracle is that you are entitle to the data the way it looked when you started your query. NO MATTER WHAT. This is implemented by your query actually reading the rollback segments created by other users instead of reading the data. it works, al long as your query doesn't run too long. If it does, the rollback segments will no longer be valid and you will get an error saying "rollback segment too old". The SCN is sort of akin to DB2's RBA. Oracle uses the SCN determine if he should read the data or a rollback segment. The SCN is an ever increasing number detailing the amount of work done the instance.
It is all very confusing. But once you figure it out, it is as clear as anythihng that Oracle does.
-- Steve Pratt (email@example.com), August 30, 2004.