LGWR - Functions - Oracle Transaction

Q.  When a transaction is committed, what does the LGWR do?
- Published on 13 Aug 15

a. Writes redo log entries in the SGA's redo log buffers to the online redo log file
b. Writes the transaction's SCN to the online redo log file
c. Both a and b
d. Writes the unique system change number (SCN) to redo log file.

ANSWER: Both a and b
 

    Discussion

  • Nirja Shah   -Posted on 22 Sep 15
    - Redo records are buffered in a circular fashion in the redo log buffer of the SGA 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 redo records 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 each committed transaction.

    - Only when all redo records associated with a given transaction are safely on disk in the online logs is the user process notified that the transaction has been committed.Redo records can also be written to a redo log file before the corresponding transaction is committed.

    - 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, even though some redo records may not be committed.

    - If necessary, the database can roll back these changes.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)