dump出Oracle block后,可以看到事物槽,包含有事物槽号(ITL),XID,UBA,FLAG,LCK,SCN。
本文主要讨论FLAG标记的规则,其中FLAG在block中占用1个字节大小。
我们知道FLAG各种标记位代表不同意思,以下为不同标记位代表不同意思:
---- = transaction is active, or committed pending cleanout
C--- = transaction has been committed and locks cleaned out
-B-- = this undo record contains the undo for this ITL entry
--U- = transaction committed (maybe long ago); SCN is an upper bound
---T = transaction was still active at block cleanout SCN
看上面的标记位有一定的规律可循,以下为测试过程,其中07代表锁的行数
BBED> modify 0x0700
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]----[/color] 7 fsc 0x0a00.0811d8b7
BBED> modify 0x0780
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]C---[/color] 0 scn 0x0a00.0811d8b7
BBED> modify 0x0740
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]-B--[/color] 7 fsc 0x0a00.0811d8b7
BBED> modify 0x0720
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]--U-[/color] 7 fsc 0x0a00.0811d8b7
BBED> modify 0x0710
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]---T[/color] 7 fsc 0x0a00.0811d8b7
本文主要讨论FLAG标记的规则,其中FLAG在block中占用1个字节大小。
我们知道FLAG各种标记位代表不同意思,以下为不同标记位代表不同意思:
---- = transaction is active, or committed pending cleanout
C--- = transaction has been committed and locks cleaned out
-B-- = this undo record contains the undo for this ITL entry
--U- = transaction committed (maybe long ago); SCN is an upper bound
---T = transaction was still active at block cleanout SCN
看上面的标记位有一定的规律可循,以下为测试过程,其中07代表锁的行数
BBED> modify 0x0700
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]----[/color] 7 fsc 0x0a00.0811d8b7
BBED> modify 0x0780
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]C---[/color] 0 scn 0x0a00.0811d8b7
BBED> modify 0x0740
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]-B--[/color] 7 fsc 0x0a00.0811d8b7
BBED> modify 0x0720
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]--U-[/color] 7 fsc 0x0a00.0811d8b7
BBED> modify 0x0710
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0023.02f.0000004e 0x0280073e.0010.2b --U- 3 fsc 0x0000.0811d995
0x02 0x0029.02d.0000004d 0x028008c5.0010.37 [color=red]---T[/color] 7 fsc 0x0a00.0811d8b7