So how is the uncommitted data written to the datafile rolled back? I mean , what if the data pertaining To that perticular uncommitted data is prior to the checkpoint position in the ORLs... ?
Now in that case, how does oracle undo the changes done to the datafile?
For eg: if the value of x=5 has been changed to 6 by a user... dbwr writes this change to the datafile... now the redo will also have this entry... after sometime the checkpoint position will be past this transaction in the redo log... and during instance recovery this perticular transaction will not be included.
How will the value of x be changed to 5 again?
January 22, 2018 - 1:45 am UTC
" if the value of x=5 has been changed to 6 by a user... dbwr writes this change to the datafile... now the redo will also have this entry."
And the *undo* information has also been written to the redo log. The redo stream would contain something like:
a-This is transaction "123",
b-record the undo, how to change x=6 back to x=5
c-record the change, I've changed to x=5 to x=6
d-transaction "123" has committed
If I never got to (d), then at instance recovery time, I'll apply that redo and end up at state (c), ie, I have uncommitted transaction 123, which I now need to rollback. And I can roll that back, because I resurrected the undo information in step (b).