Uncommitted data in Redo Logs
Does Oracle store uncommitted data in Redo Logs?
Any changes made to the data is registered immediately in the *redo log buffer* in form of redo
entries. A flag is also stored against each of these changes, which indicates whether the change is
committed or not. The LGWR will record these changes to the redo logs on the disk.
The changes are also recorded in *rollback segs*. This is required for consistent view for other users
working on the same data and also for reapplying the old data, when the changes are rolled back.
Rollback segments are populated during the roll forward phase. A rollback segment entry is added if
an uncommitted data block is found on the data files and no rollback entry exists in the rollback
segment. Oracle can use the information in a rollback segment during database recovery to undo any
uncommitted changes applied from the redo log to the datafiles, putting the data into a consistent
state.
Bottom line, Oracle stores both committed and uncommited data in redo logs. The rollback segments
are reconstructed with the old image of the uncommitted changed data from the redo logs. During
recovery, Oracle reads from the redo log to find out what changes had not been committed. Such
changes are rolled back and the old value is taken from the rollback segments for reapplying.
This page was created on 16-dec-2001 and last updated on 16-dec-2001.
please forward all queries to amar_padhi@fastmail.fm