How Db2 creates log records

Log records typically go through a standard life cycle.

  1. Db2 registers changes to data and significant events in recovery log records.
  2. Db2 processes recovery log records and breaks them into segments if necessary.
  3. Log records are placed sequentially in output log buffers, which are formatted as VSAM control intervals (CIs). Each log record is identified by a continuously increasing RBA. For basic 6-byte RBA format, the range is 0 to 248-1, where 248 represents 2 to the 48th power. For extended 10-byte RBA format, the range is 0 to 280-1, where 280 represents 2 to the 80th power. (In a data sharing environment, a log record sequence number (LRSN) is also used to identify log records.)
  4. The CIs are written to a set of predefined disk active log data sets, which are used sequentially and recycled.
  5. As each active log data set becomes full, its contents are automatically offloaded to a new archive log data set.

If you change or create data that is compressed, the data logged is also compressed. Changes to compressed rows that result from inserts, updates, and deletes are also logged as compressed data. Updates to compressed indexes are not logged as compressed data.