Contents of the log

The log contains the information that is needed to recover the results of program execution, the contents of the database, and the Db2 subsystem. The log does not contain information for accounting, statistics, traces, or performance evaluation.

Begin program-specific programming interface information.The three main types of log records are unit of recovery, checkpoint, and database page set control records.

Each log record has a header that indicates its type, the Db2 subcomponent that made the record, and, for unit-of-recovery records, the unit-of-recovery identifier. The log records can be extracted and printed by the DSN1LOGP utility.

The log relative byte address and log record sequence number

For basic 6-byte RBA format, the Db2 log can contain up to 248 bytes, where 248 is 2 to the 48th power. For extended 10-byte RBA format, the Db2 log can contain up to 280 bytes, where 280 is 2 to the 80th power. Each byte is addressable by its offset from the beginning of the log. That offset is known as its relative byte address (RBA).

A log record is identifiable by the RBA of the first byte of its header; that RBA is called the relative byte address of the record. The record RBA is like a timestamp because it uniquely identifies a record that starts at a particular point in the continuing log.

In the data sharing environment, each member has its own log. The log record sequence number (LRSN) identifies the log records of a data sharing member. The LRSN might not be unique on a data sharing member. The LRSN is a hexadecimal value derived from a store clock timestamp. Db2 uses the LRSN for recovery in the data sharing environment.

Effects of Db2 data compression

Log records can contain compressed data if a table contains compressed data. For example, if the data in a Db2 row is compressed, all data logged because of changes to that row is compressed. If logged, the record prefix is not compressed, but all of the data in the record is in compressed format. Reading compressed data requires access to the dictionary that was in use when the data was compressed. Log records can also contain previously existing dictionaries if DATA CAPTURE CHANGES is active for the table. Log records are written when the dictionary is rebuilt or no longer required.End program-specific programming interface information.

Data Replication's Q Capture program requires access to the dictionary for a source compressed table space when it processes an IFI 306 READS request. In this case, if the compressed table space is in a data sharing environment, a lock on the table space may cause a Group Buffer Pool dependency (GBPDEP).