Introduction to RedoLog File
What Is the Redo Log?
The most crucial structure for recovery operations is the
, which consists of two or more preallocated files that store all changes made to the database as they occur. Every instance of anOracle Database has an associated redo log to protect the database in case of an instance failure
Redo Log Contents
Redo log files are filled with
. A redo record, also called a
, is made up of a group of
, each of which is adescription of a change made to a single block in the database. For example,if you change a salary value in an employee table, you generate a redorecord containing change vectors that describe changes to the data segmentblock for the table, the undo segment data block, and the transaction table of the undo segments.
Redo records are buffered in a circular fashion in the redo log buffer of theSGA and are written to one of the redo log files by the Log Writer (LGWR)database background process.
Whenever a transaction is committed, LGWR writes the transaction redorecords from the redo log buffer of the SGA to a redo log file, and assigns a
system change number
(SCN) to identify the redo records for eachcommitted transaction
If the redo log buffer fills, or another transaction commits, LGWR flushes all of the redo log entries in the redo log buffer to a redo log file.
The redo log of a database consists of two or more redo log files.
The database requiresa minimum of two files
Chapter 5 | Managing the RedoLog files