Uncommitted Trasactions [message #320093] |
Wed, 14 May 2008 01:30 |
hexmanju
Messages: 78 Registered: September 2005 Location: MUMBAI
|
Member |
|
|
Hi
Can anyone let me know that while a database is up and running is there chances that the dirty (modified) buffers which are uncommited gets flushed to the Data files and then how is this taken care of when the Instance is up and running.Everywhere i read this that next time instance recovery takes place it will rollback uncommitted trasaction but say if instance recovery happens after a while or so will the uncommitted transaction sit in the Data file till that time.
Kindly explain
Thanks
MM
|
|
|
|
|
|
|
Re: Uncommitted Trasactions [message #320320 is a reply to message #320093] |
Wed, 14 May 2008 12:29 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Quote: | Last step of instance recovery.
|
The first and the last step of instance recovery is rolling forward.
Rolling backward is something that happens after the instance recovery is done.
Because recovery essentially means making database consistent by applying redo.
Once database gets opened,recovery is over but applying undo might continue.
|
|
|
|
|
|
|
Re: Uncommitted Trasactions [message #320482 is a reply to message #320093] |
Thu, 15 May 2008 04:33 |
hexmanju
Messages: 78 Registered: September 2005 Location: MUMBAI
|
Member |
|
|
Thanks for all your inputs but what i am still unclear is i am telling you that my instance does not crash at all.Say if a user does not commit a huge transaction at all and due to lack of space in DB cache that change gets flushed into data files.what happens to that data change if my instance does not crash at all .Will Oracle allow it to stay in the data file .
I understand at Checkpoint all modified buffers gets flushed to data files and in that if we have uncommitted changes that also goes to the data file?AM i correct.WIll it stay there for ever and say if no crash happens its gonna sit there or what?
|
|
|
|
Re: Uncommitted Trasactions [message #320491 is a reply to message #320093] |
Thu, 15 May 2008 04:54 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Quote: | Say if a user does not commit a huge transaction at all and due to lack of space in DB cache that change gets flushed into data files.what happens to that data change if my instance does not crash at all .Will Oracle allow it to stay in the data file .
|
Commit/Rollback is a must otherwise there would be indefinite row level locks preventing users to see updated data.So taht data change is not visible to other sessions.
|
|
|
|
|
Re: Uncommitted Trasactions [message #320522 is a reply to message #320519] |
Thu, 15 May 2008 06:10 |
hexmanju
Messages: 78 Registered: September 2005 Location: MUMBAI
|
Member |
|
|
Thanks Michel Cardot for staying with my Post and patiently replying my queries..It has been good knowing u through this post.
Just a question->Do u think Oracle Database allows such uncommitted trasactions frequently or does it happen once a while .I mean to ask does it really Happen?
|
|
|
Re: Uncommitted Trasactions [message #320527 is a reply to message #320522] |
Thu, 15 May 2008 06:38 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
For Oracle (this is not true for other rdbms), you must commit or rollback only when your functional transaction is over. You do all the work your business needs require and only then you commit (or rollback).
That means that some transactions may last hours and Oracle is designed to handle them.
Regards
Michel
|
|
|