The transaction manager produces log records signifying the completion of transaction events (for example, commit or rollback). The time stamps in the log records are in Coordinated Universal Time (CUT), and mark the time (in seconds) since January 01, 1970.
This log record is written for XA transactions in a single-node environment, or on the coordinator node in MPP. It is only used for XA applications. The log record is written when a transaction commits after one of the following events:
Table 115. Normal Commit Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction committed | sqluint32 | 20(4) |
Authorization identifier of the applicationa | char [ ] | 24(variable) |
Total Length: 24 bytes plus variable propagatable (24 bytes non-propagatable) | ||
a If the log record is marked as propagatable
|
This log record is written when an indoubt transaction is committed.
Table 116. Heuristic Commit Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction committed | sqluint32 | 20(4) |
Authorization identifier of the applicationa | char [ ] | 24(variable) |
Total Length: 24 bytes plus variable propagatable (24 bytes non-propagatable) | ||
a If the log record is marked as propagatable
|
This log record is written on a coordinator node for an application that
performs updates on at least one subordinator node.
Table 117. Heuristic MPP Coordinator Commit Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction committed | sqluint32 | 20(4) |
MPP identifier of the transaction | SQLP_GXID | 24(20) |
Maximum node number | unsigned short | 44(2) |
TNL | unsigned char [ ] | 46(max node number/8 + 1) |
Authorization identifier of the applicationa | char [ ] | variable(variable) |
Total Length: variable | ||
a If the log record is marked as propagatable
|
This log record is written on a subordinator node in MPP.
Table 118. MPP Subordinator Commit Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction committed | sqluint32 | 20(4) |
MPP identifier of the transaction | SQLP_GXID | 24(20) |
Authorization identifiera | char [ ] | 44(variable) |
Total Length: 44 bytes plus variable propagatable (44 bytes non-propagatable) | ||
a If the log record is marked as propagatable
|
This log record is written when a transaction aborts after one of the following events:
Table 119. Normal Abort Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Authorization identifier of the applicationa | char [ ] | 20(variable) |
Total Length: 20 bytes plus variable (20 bytes non-propagatable) | ||
a If the log record is marked as propagatable
|
This log record is written when an indoubt transaction is aborted.
Table 120. Heuristic Abort Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Authorization identifier of the applicationa | char [ ] | 20(variable) |
Total Length: 20 bytes plus variable (20 bytes non-propagatable) | ||
a If the log record is marked as propagatable
|
This log record is written if a transaction commits and a pending list
exists. The pending list is a linked list of non-recoverable operations
(such as deletion of a file) that can only be performed when the
user/application issues a COMMIT. The variable length structure
contains the pending list entries.
Table 121. Local Pending List Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction committed | sqluint32 | 20(4) |
Authorization identifier lengtha | unsigned short | 24(2) |
Authorization identifier of the applicationa | char [ ] | 26(variable)b |
Pending list entries | variable | variable(variable) |
Total Length: 26 bytes plus variables propagatable (24 bytes plus pending list entries non-propagatable) | ||
a If the log record is marked as propagatable b Variable based on Authorization identifier length
|
This log record is written if a transaction involved in a two-phase commit
commits, and a pending list exists. The pending list contains
non-recoverable operations (such as deletion of a file) that can only be
performed when the user/application issues a COMMIT. The variable
length structure contains the pending list entries.
Table 122. Global Pending List Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Authorization identifier lengtha | unsigned short | 20(2) |
Authorization identifier of the applicationa | char [ ] | 22(variable)b |
Global pending list entries | variable | variable(variable) |
Total Length: 22 bytes plus variables propagatable (20 bytes plus pending list entries non-propagatable) | ||
a If the log record is marked as propagatable b Variable based on Authorization identifier length
|
This log record is written for XA transactions in a single-node
environment, or on the coordinator node in MPP. It is only used for XA
applications. The log record is written to mark the preparation of the
transaction as part of a two-phase commit. The XA prepare log record
describes the application that started the transaction, and is used to
recreate an indoubt transaction.
Table 123. XA Prepare Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction prepared | sqluint32 | 20(4) |
Log space used by transaction | sqluint64 | 24(8) |
Transaction Node List Size | sqluint32 | 32(4) |
Transaction Node List | unsigned char [ ] | 36(variable) |
XA identifier of the transaction | SQLXA_XID | variable(140) |
Application Information Length | sqluint32 | variable(4) |
Code Page Identifier | sqluint32 | variable(4) |
Transaction Start Time | sqluint32 | variable(4) |
Application name | char [ ] | variable(20) |
Application identifier | char [ ] | variable(32) |
Sequence number | char [ ] | variable(4) |
Database alias used by client | char [ ] | 240(20) |
Authorization identifier | char [ ] | variable(variable) |
Synclog information | variable | variable(variable) |
Total Length: 264 bytes plus variables |
This log record is written for MPP transactions on subordinator
nodes. The log record is written to mark the preparation of the
transaction as part of a two-phase commit. The MPP subordinator prepare
log record describes the application that started the transaction, and is used
to recreate an indoubt transaction.
Table 124. MPP Subordinator Prepare Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time Transaction Prepared | sqluint32 | 20(4) |
Log space used by transaction | sqluint64 | 24(8) |
Coordinator LSN | SQLP_LSN | 32(6) |
Padding | char [ ] | 38(2) |
MPP identifier of the transaction | SQLP_GXID | 40(20) |
Application Information Length | sqluint32 | 60(4) |
Code page | sqluint32 | 64(4) |
Transaction Start Time | sqluint32 | 68(4) |
Application name | char [ ] | 72(20) |
Application identifier | char [ ] | 92(32) |
Sequence number | char [ ] | 124(4) |
Database alias used by client | char [ ] | 128(20) |
Authorization identifier | char [ ] | 148(variable) |
Total Length: 148 bytes plus variable |
This log record is used to mark 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. This log record contains only a
6-byte log sequence number (complsn, stored in the log record header
starting at offset 20). When this log record is read during rollback
(following an aborted transaction), complsn marks the next log record
to be compensated.
Table 125. Migration Begin Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Complsn | SQLP_LSN | 20(6) |
Total Length: 26 bytes |
The utility manager produces log records associated with the following DB2 common server utilities:
The log records signify the beginning or the end of the requested activity. All utility manager log records are marked as propagatable regardless of the tables that they affect.
This log record is associated with the beginning of catalog
migration.
Table 126. Migration Begin Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Migration start time | char[ ] | 20(10) |
Migrate from release | unsigned short | 30(2) |
Migrate to release | unsigned short | 32(2) |
Total Length: 34 bytes |
This log record is associated with the successful completion of catalog
migration.
Table 127. Migration End Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Migration end time | char[ ] | 20(10) |
Migrate to release | unsigned short | 30(2) |
Total Length: 32 bytes |
This log record is associated with the beginning of a load.
Table 128. Load Start Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Log record identifier | sqluint32 | 20(4) |
Pool identifier | unsigned short | 24(2) |
Object identifier | unsigned short | 26(2) |
Flag | unsigned char | 28(1) |
Object pool list | variable | 29(variable) |
Total Length: 29 bytes plus variable |
This log record is associated with the beginning of the delete phase in a
load operation. The delete phase is started only if there are duplicate
primary key values.
Table 129. Table Load Delete Start Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Total Length: 20 bytes |
This log record is associated with the end of the delete phase in a load
operation.
Table 130. Load Delete Start Compensation Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Total Length: 20 bytes |
This log record is written when a load transaction commits. The
pending list is a linked list of non-recoverable operations which are deferred
until the transaction commits. No commit log record follows this
transaction.
Table 131. Load Pending List Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Time transaction committed | sqluint32 | 20(4) |
Authorization identifier of the applicationa | char[ ] | 24(9) |
Pending list entries | variable | 33(variable) |
Total Length: 33 bytes plus pending list entries propagatable (24 bytes plus pending list entries non-propagatable) | ||
a If the log record is marked as propagatable
|
This log record is associated with the end of a successful backup.
Table 132. Backup End Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Backup end time | sqluint32 | 20(4) |
Total Length: 24 bytes |
This log record is associated with table space ROLLFORWARD recovery.
It is written for each table space that is successfully rolled forward.
Table 133. Table Space Rolled Forward Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | LogManagerLogRecordHeader | 0(20) |
Table space identifier | unsigned short | 20(2) |
Total Length: 22 bytes |
This log record is associated with table space ROLLFORWARD recovery.
It marks the beginning of a table space rollforward to a point in time.
Table 134. Table Space Roll Forward to PIT Begins Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Time stamp for this log record. | sqluint32 | 0(4) |
Time stamp to which table spaces are being rolled forward. | sqluint32 | 4(4) |
Number of pools being rolled forward. | unsigned short | 8(2) |
Integer list of pool IDs that are being rolled forward. | int*numpools | 10(variable) |
Total Length: 10 bytes plus variable |
This log record is associated with table space ROLLFORWARD recovery.
It marks the end of a table space rollforward to a point in time.
Table 135. Table Space Roll Forward to PIT Ends Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Time stamp for this log record. | sqluint32 | 0(4) |
Time stamp to which table spaces were rolled forward. | sqluint32 | 4(4) |
A flag whose value is TRUE if the roll forward was successful, or FALSE if the roll forward was canceled. | int | 8(4) |
Total Length: 12 bytes |
Datalink manager log records are the result of DDL, DML, or completion of
transaction events involving DATALINK columns. These log records are
written only when the DDL or the DML involves DATALINK columns with the file
link control attribute.
Table 136. Datalink Manager Log Record Header Structure (DLMLogRecordHeader)
Description | Type | Offset (Bytes) |
---|---|---|
Component identifier (=8) | unsigned char | 0(1) |
Function identifiera | unsigned char | 1(1) |
padding | char [] | 2(2) |
Total Length: 6 bytes | ||
Definitions and Values a Valid function identifier values LINK_FILE 33 link file UNLINK_FILE 34 unlink file DELETE_GROUP 35 delete group DELETE_PGROUP 36 delete pgroup DLFM_PREPARE 37 DLFM prepare |
The link file log record is written when an insert or an update on a table
with a DATALINK column creates a link to a file. One log record is
written for each new link that is created. This log record is only used
for undo.
Table 137. Link File Log Record Structure
Description | Type | Offset (Bytes) | ||
---|---|---|---|---|
Log header | DLMLogRecordHeader | 0(4) | ||
ServerId | sqlint32 | 4(4) | ||
ReadOnly | int | 8(4) | ||
AuthId | char [] | 12(8) | ||
GroupId | char [] | 20(17) | ||
padding | char [] | 37(1) | ||
AccessControl | unsigned short | 38(2) | ||
PrefixId | char [] | 40(9) | ||
padding | char [] | 49(3) | ||
RecoveryId | char [] | 52(7) | ||
padding | char [] | 59(1) | ||
Time stamp | sqluint32 | 60(4) | ||
StemNameLen | sqluint32 | 64(4) | ||
StemName | variable | 68(variable) | ||
ServerNameLena | sqluint32 | variable(4) | ||
PrefixNameLena | sqluint32 | variable(4) | ||
ServeNamePrefixNamea | variable | variable(variable) | ||
Total Length: 68 plus StemNameLen if non-progagatable (76 plus StemNameLen plus ServerNameLen plus PrefixNameLen if propagatable) | ||||
|
The unlink file log record is written when a delete or an update on a table
with a DATALINK column drops a link to a file. One log record is
written for each link that is dropped. This log record is only used for
undo.
Table 138. Unlink File Log Record Structure
Description | Type | Offset (Bytes) | ||
---|---|---|---|---|
Log header | DLMLogRecordHeader | 0(4) | ||
ServerId | sqlint32 | 4(4) | ||
PrefixId | char [] | 8(9) | ||
padding | char [] | 17(3) | ||
RecoveryId | char [] | 20(7) | ||
padding | char [] | 27(1) | ||
Time stamp | sqluint32 | 28(4) | ||
StemNameLen | sqluint32 | 32(4) | ||
StemName | variable | 36(variable) | ||
poolIDa | unsigned short | variable(2) | ||
objectIDa | unsigned short | variable(2) | ||
colNuma | unsigned short | variable(2) | ||
paddinga | char [] | variable(2) | ||
ServerNameLena | sqluint32 | variable(4) | ||
PrefixNameLena | sqluint32 | variable(4) | ||
ServerNamePrefixNamea | variable | variable(variable) | ||
Total Length: 36 plus StemNameLen if non-propagatable (52 plus StemNameLen plus ServerNameLen plus PrefixNameLen if propagatable) | ||||
|
The delete group log record is written when a table with DATALINK columns
(having the file link control attribute) is dropped. One log record is
written for each such DATALINK column for each DB2 Data Links Manager
configured to the database. For a given DB2 Data Links Manager, the log
record is written only if that DB2 Data Links Manager has the group defined on
it when the table is dropped. This log record is only used for
undo.
Table 139. Delete Group Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | DLMLogRecordHeader | 0(4) |
ServerId | sqlint32 | 4(4) |
RecoveryId | char [] | 8(7) |
padding | char [] | 15(1) |
GroupId | char [] | 16(17) |
padding | char [] | 33(3) |
Total Length: 36 bytes |
The delete pgroup log record is written when a table space is
dropped. One log record is written for each DB2 Data Links Manager
configured to the database. For a given DB2 Data Links Manager, the log
record is written only if that DB2 Data Links Manager has the pgroup defined
on it when the table space is dropped. This log record is only used for
undo.
Table 140. Delete PGroup Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | DLMLogRecordHeader | 0(4) |
ServerId | sqlint32 | 4(4) |
poolLifeLSN | SQLU_LSN | 8(6) |
poolId | unsigned short | 14(2) |
RecoveryId | char [] | 16(7) |
padding | char [] | 23(1) |
Total Length: 24 bytes |
The DLFM prepare log record is written during the prepare phase, when a
two-phase commit is used for transactions involving DB2 Data Links
Managers. It is used to recreate a transaction for DB2 Data Links
Managers that are in-doubt.
Table 141. DLFM Prepare Log Record Structure
Description | Type | Offset (Bytes) |
---|---|---|
Log header | DLMLogRecordHeader | 0(4) |
NumDLFMs | unsigned short | 4(4) |
ServerIds | variable | 8(variable) |
Total Length: 8 bytes plus (NumDLFMs * 4) |