IBM Books

API Reference


Log Manager Header

All DB2 common server log records begin with a log manager header. This header contains information detailing the log record and transaction information of the log record writer.

Table 86. Log Manager Log Record Header (LogManagerLogRecordHeader)
Description Type Offset (Bytes)
Length of the entire log record int 0(4)
Type of log recorda short 4(2)
Log record general flagb short 6(2)
Log Sequence Number of the previous log record written by this transaction. It is used to chain log records by transaction. If the value is 0000 0000 0000, this is the first log record written by the transaction. SQLU_LSNc 8(6)
Unique transaction identifier SQLU_TIDd 14(6)
Log Sequence Number of the log record for this transaction prior to the log record being compensated. (Note: For compensation log records only.) SQLU_LSN 20(6)
Log Sequence Number of the log record for this transaction being compensated. (Note: For propagatable compensation log records only.) SQLU_LSN 26(6)
Total Length for Log Manager Log Record Header:
  • Non Compensation: 20 bytes
  • Compensation: 26 bytes
  • Propagatable Compensation: 32 bytes
Definitions and Values:
a Valid log record types
A  Normal Abort                 p  Tablespace roll forward to PIT starts
c  MPP coordinator commit       q  Tablespace roll forward to PIT ends
C  Compensation                 Q  Global Pending List
D  Tablespace Rolled Forward    R  Redo
E  Local Pending List           s  MPP subordinate commit
G  Load Pending List            U  Undo
I  Heuristic Abort              V  Migration Begin
J  Load Start                   W  Migration End
M  Normal Commit                X  Prepare
N  Normal                       Y  Heuristic Commit
o  Backup Start                 z  MPP prepare
O  Backup End                   Z  XA prepare
b Log record general flag constants
   Redo Always                0x0001
   Propagatable               0x0002
   Conditionally Recoverable  0x0080
c Log Sequence Number (LSN)
   A unique log record identifier representing the relative byte address
   of the log record within the database log.
 
   SQLU_LSN: union {  char  [6] ;
                      short [3] ;
                     }
d Transaction Identifier (TID)
   A unique log record identifier representing the transaction.
 
   SQLU_TID: union {  char  [6] ;
                      short [3] ;
                     }


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]