Discuss writing data from the redo buffer to the redo log files.
Writing Data to redo log Files
Assuming that we do not have a read only system, data will be modified. This data will be stored on the data buffer cache to be written to disk in the data files. When we modify data, the before and after image of the data object is written to the redo log buffer area. The DBWR process is very busy reading and writing information to and from the data files. The LGWR process relieves DBWR from writing every modification to disk the moment it is made. Let us review how LGWR processes the redo log buffer information.
Writing data to redo log files
Redo log files are used in a circular fashion. Let’s say we have two redo log files, log1orc1.ora and log2orc1.ora. LGWR writes information first to log1orc1.ora until a log file switch occurs. Then LGWR writes data to log2orc1.ora until a log file switch occurs. Then LGWR writes data into log1orc1.ora, writing over any information currently stored in log1orc1.ora. Redo log file switches occur when LGWR fills up a redo log file or if a DBA executes ALTER SYSTEM SWITCH LOGFILE. When a redo log file switch occurs, a checkpoint is generated. This will be covered later in this module.
Finding information about your redo log files
V$LOG provides group information such as group number, log sequence number and status.
V$LOGFILE provides log file member information such as name and status.
V$LOG_HISTORY contains control file log history information.
Look at the following writing.sb.html to view information from V$LOG and V$LOGFILE as well as V$LOG_HISTORY.
V$LOG, V$LOGFILE, and V$LOG_HISTORY
View the Image below to see information about V$LOGHISTORY.
The next lesson is about multiplexing redo log files.