Log File Management: Concepts

For an explanation of the importance of log files and background information about the use of log files in database transaction processing and database recovery, refer to the IBM documentation.

This section describes the log file management tasks that can be accessed from the DB2 Control Center (DB2CC).

Within an R/3 environment, a log file can have four different states during its life cycle:

  1. Online active
  2. The log file is currently being used to log transactions. The location of the log file is the LOGPATH database.

  3. Online retained
  4. The log file is no longer used, but contains transactions for which data pages have not yet been written from the buffer pool to disk. The location of the log file is the LOGPATH database and DB2DB6_ARCHIVE_PATH (that is, the log file was archived by the db2 user exit).

  5. Offline retained
  6. The log file is neither being used, nor contains transactions with unwritten data pages. The location of the log file is DB2DB6_ARCHIVE_PATH.

  7. Retained archived

The log file is archived. The location of the log file is ADSM or tape (that is, it has been saved by BRARCHIVE).

The SAP-DB2admin enhancements to the DB2CC support this life cycle.

The Life Cycle of a Log File

  1. The DB2 user exit program automatically stores log files that go offline into the DB2DB6_ARCHIVE_PATH. When requested by a ROLLFORWARD, it retrieves offline retained logs from the DB2DB6_RETRIEVE_PATH.
  2. The BRRESTORE program retrieves archived retained log files from the archive repository and places them in the DB2DB6_RETRIEVE_PATH. BRARCHIVE is used to back up offline log files into an archive. ADSM is the preferred solution. It provides more robust processing and is much more flexible. Both BRARCHIVE and BRRESTORE are accessed from the DB2CC.

For a description of the parameters that affect log file management, see Log File Management Parameters.

For a description of the available log file management protocols, see Log File Management Protocols.