DB2 Version 9.7 for Linux, UNIX, and Windows

DB2 log records

This section describes the structure of the DB2® log records returned by the db2ReadLog API when the iFilterOption input value DB2READLOG_FILTER_ON is specified. Only log records marked as propagatable (propagatable flag is set in the log record header) are returned when this value is used. Only propagatable log records are documented. All other log records are intended for only IBM® internal use and are therefore not documented.

When a transaction invokes a log writing utility or performs writable work against a table with the DATA CAPTURE CHANGES attribute set to ON, the transaction is marked as propagatable. Only propagatable transactions have their transaction manager log records marked as propagatable.

All DB2 log records begin with a log manager header. This header includes the total log record size, the log record type, and transaction-specific information. It does not include information about accounting, statistics, traces, or performance evaluation. For more information, see Log manager header.

Log records are uniquely identified by a log sequence number (LSN). The LSN represents a relative byte address, within the database log, for the first byte of the log record. It marks the offset of the log record from the beginning of the database log.

The log records written by a single transaction are uniquely identifiable by a field in the log record header. The unique transaction identifier is a six-byte field that increments by one whenever a new transaction is started. All log records written by a single transaction contain the same identifier.

Table 1. DB2 Log Records
Type Record Name Description
Data Manager Initialize table log record New permanent table creation.
Data Manager Import replace (truncate) log record Import replace activity.
Data Manager Activate not logged initially log record Alter table activity that includes the ACTIVATE NOT LOGGED INITIALLY clause.
Data Manager Rollback insert log record Rollback row insert.
Data Manager Reorg table log record REORG committed.
Data Manager Create index, drop index log records Index activity.
Data Manager Create table, drop table, rollback create table, rollback drop table log records Table activity.
Data Manager Alter table attribute log record Propagation, check pending, and append mode activity.
Data Manager Alter table add columns, drop columns, rollback add columns, rollback drop columns log record Adding columns to existing tables.
Data Manager Alter column attribute log record Columns activity.
Data Manager Undo alter column attribute log record Column activity.
Data Manager Insert record, delete record, rollback delete record, rollback update record log records Table record activity.
Data Manager Insert record to empty page, delete record to empty page, rollback delete record to empty page, rollback insert record to empty page log records Multidimensional clustered (MDC) table activity.
Data Manager Update record log record Row updates where storage location not changed.
Data Manager Rename of a table or schema log record Table or schema name activity.
Data Manager Undo rename of a table or schema log record Table or schema name activity.
Long Field Manager Add/delete/non-update long field record log records Long field record activity.
Transaction Manager Normal commit log record Transaction commits.
Transaction Manager Heuristic commit log record Indoubt transaction commits.
Transaction Manager MPP coordinator commit log record Transaction commits. This is written on a coordinator node for an application that performs updates on at least one subordinator node.
Transaction Manager MPP subordinator commit log record Transaction commits. This is written on a subordinator node.
Transaction Manager Normal abort log record Transaction aborts.
Transaction Manager Heuristic abort log record Indoubt transaction aborts.
Transaction Manager Local pending list log record Transaction commits with a pending list existing.
Transaction Manager Global pending list log record Transaction commits (two-phase) with a pending list existing.
Transaction Manager XA prepare log record XA transaction preparation in two-phase commit environments.
Transaction Manager MPP subordinator prepare log record MPP transaction preparation in two-phase commit environments. This log record only exists on subordinator node.
Transaction Manager TM prepare log record Coordinated transaction preparation as part of a two-phase commit, where the database is acting as the TM database.
Transaction Manager Backout free log record Marks the end of a backout free interval. The backout free interval is a set of log records that is not to be compensated if the transaction aborts.
Transaction Manager Application information log record Information about the application that started the transaction.
Transaction Manager Federated Prepare Log Record Information about the federated resource manager involved in the transaction.
Utility Manager System catalog migration begin log record System catalog migration starts.
Utility Manager System catalog migration end log record System catalog migration completes.
Utility Manager Load start log record Table load starts.
Utility Manager Backup end log record Backup activity completes.
Utility Manager Table space rolled forward log record Table space rollforward completes.
Utility Manager Table space roll forward to point in time starts log record Marks the beginning of a table space rollforward to a point in time.
Utility Manager Table space roll forward to point in time ends log record Marks the end of a table space rollforward to a point in time.