Parent Pool ID = 2 Parent Object ID = 4
Object Type = 00 = 0
Flags = 00
Record 10 Log Page Offset = 0370 = 880
Log File Offset = 00002370 = 9072
Record LSN = 0000 0000 0138 8370
Record Size = 0020 = 32
Record Type = 55 = Undo
Log Header Flags = 0001
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8308
Originator Code = 04 = Data Object Manager
Function ID = 06 = 6 : SQLD_LRT_START_OBJ_CMPL
Pool ID = 2 Object ID = 4
Parent Pool ID = 2 Parent Object ID = 4
Object Type = 00 = 0
Flags = 00
Record 11 Log Page Offset = 0390 = 912
Log File Offset = 00002390 = 9104
Record LSN = 0000 0000 0138 8390
Record Size = 0024 = 36
Record Type = 4E = Normal
Log Header Flags = 0000
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8370
Originator Code = 06 = Storage Manager
Function ID = 02 = 2 : GET_ONE_EXT--创建一个表需要两个EXTENT,获取第一个extent
Pool ID = 0002 = 2
smp_id = 32
map_ix = 0
mask = 00010000
Extent Affected = 3
Record 12 Log Page Offset = 03B4 = 948
Log File Offset = 000023B4 = 9140
Record LSN = 0000 0000 0138 83B4
Record Size = 0028 = 40
Record Type = 52 = Redo
Log Header Flags = 0000
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8390
Originator Code = 06 = Storage Manager
Function ID = 06 = 6 : FMT_EMP
Pool ID = 0002 = 2
objectID = 0004 = 4
parentObjectID = 0004 = 4
objectType = 40 = 64
parentPoolID = 0002 = 2
emp_id = 00000060 = 96
empLevel = 00000000 = 0
Record 13 Log Page Offset = 03DC = 988
Log File Offset = 000023DC = 9180
Record LSN = 0000 0000 0138 83DC
Record Size = 0024 = 36
Record Type = 4E = Normal
Log Header Flags = 0000
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8390
Originator Code = 06 = Storage Manager
Function ID = 02 = 2 : GET_ONE_EXT--创建一个表需要两个EXTENT,获取第二个extent
Pool ID = 0002 = 2
smp_id = 32
map_ix = 0
mask = 00001000
Extent Affected = 4
Record 14 Log Page Offset = 0400 = 1024
Log File Offset = 00002400 = 9216
----------------------------略----------------
tdesc. No. of columns = 2
tdesc. type: length: null: offset = INTEGER: 4: ALLOWS NULLS: 0
Record 18 Log Page Offset = 04F6 = 1270
Log File Offset = 000024F6 = 9462
Record LSN = 0000 0000 0138 84F6
Record Size = 001A = 26
Record Type = 52 = Redo---记录类型是redo用于前滚,undo用于回滚。
Log Header Flags = 0001
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8458
Originator Code = 01 = Data File Manager
Function ID = B6 = 182 : SQLD_LR_REFRESH_TCB
Pool ID = 2 Object ID = 4
---------------------------------略------------------------
Back Pointer LSN = 0000 0138 86DE
Originator Code = 01 = Data File Manager
Function ID = A2 = 162 : INSREC_DP ----insert操作的日志记录,对于insert记录整行内容。
Pool ID = 0 Object ID = 5
RID = x07006D0D0000 Pool Page = 3437 Slot = 7
reclen = 449 free_sp = 15
recoff = 31
oRecType = NORMAL
oTotRecLen = 449
TRHEAD Rec Type = FIXEDVAR
-------------------------略-------------------------
Record 40 Log Page Offset = 0D5B = 3419
Log File Offset = 00002D5B = 11611
Record LSN = 0000 0000 0138 8D5B
Record Size = 0094 = 148
Record Type = 4E = Normal
Log Header Flags = 0000
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8D41
Originator Code = 01 = Data File Manager
Function ID = 6C = 108 : XOR_UPDATEFULL_DP--update记录,对于update操作,日志中只记录update列前后的值,采用XOR操作。
Pool ID = 0 Object ID = 273
RID = x0F009B120000 Pool Page = 4763 Slot = 15
reclen = 108 free_sp = 2082
recoff = 2114
oRecType = NORMAL
oTotRecLen = 108
TRHEAD Rec Type = FIXEDVAR
---------------------------------------略-------
Record Type = 4E = Normal
Log Header Flags = 0000
Record TID = 0000000000CC
Back Pointer LSN = 0000 0138 8F7B
Originator Code = 02 = Index Manager
Function ID = 6A = 106 : DELREC_DP------------------------删除记录,对于delete操作,日志中记录整行的内容。
Pool ID = 0 Object ID = 6 Index Object Type = x1
Parent Pool ID = 0 Parent Object ID = 6
Index Root Page = 000000BE = 190
=========================
上述内容过于底层,不多讲解,只希望读者理解其中原理。文章内容摘自《深入解析DB2》一书。