Entering content frame

Process documentation Redo Log Management Locate the document in the library structure

Purpose

The database system writes redo log entries (after images) in order to be able to repeat transactions that have already been completed.

Example

A power outage has occurred. The data changes that the last transactions executed had only been stored by the database system in the data cache and had not yet been written to the data area with a savepoint. These data changes in the data cache (working memory) were lost due to the power outage and must therefore be repeated by the database system.

Redo log management has the following tasks:

·        It manages the redo log entries.

·        It regularly writes database parameters and other internal control information for logging to the log area.

·        In the case of a log backup, it queries whether and how many log entries from the log area need to be backed up.

·        When users request information about the database system, it supplies the information about wait states and the types of accesses to the log queues.

For special situations, you can temporarily switch off redo log management (see Log Settings).

Process Flow

...

       1.      A user opens a transaction that will change data in the database.

       2.      The user task that executes the transaction writes the redo log entries for your transaction on a page in a log queue.

       3.      The log writer (see Overview of Tasks) writes the redo log entries of the transaction from the log queue to the log area at the following times:

¡        When a page in the log queue is full

¡        When the user closes the transaction with a COMMIT

Log pages in the log queue which were not full at the time of writing remain in the log queue, are filled and then written to the log area again during the next write process.

When writing to the log area, the log writer gives the page a sequence number and a time stamp. Using the sequence numbers, the database system can later determine the definitive sequence of the pages in the log area. The timestamp is required by the database system for it to be able to restore the database instance to its state at a certain point in time.

Caution

If the log area is full, the log writer locks the log queue. Then the database system stops all transactions that want to deposit redo log entries in log queues and no further data changes can be carried out in the database.

The database system can only overwrite old log entries in the log area when those log entries have been backed up (exception: overwrite mode for the log area is on).

If automatic log backup is on, then the log writer automatically backs up the redo log entries from the log area.

See also:

Using Log Entries for a Restart or Restore

Logging Transactions

 

Leaving content frame