oraclebtreeindex索引块结构初探(二)

2014-11-24 17:08:03 · 作者: · 浏览: 1
0x0012.4a18d046 seq: 0x01 flg: 0x06 tail: 0xd0460601 frmt: 0x02 chkval: 0xacfe type: 0x06=trans data Hex dump of block: st=0, typ_found=1 Dump of memory from 0x0000000110432000 to 0x0000000110434000 110432000 06A20000 0B0AE6AC 4A18D046 00120106 [........J..F....] 110432010 ACFE0000 02030022 00058FCC 4A18D044 [......."....J..D] 110433FB0 024846FE 0B0AE6AF 02545AFE 0B112280 [.HF......TZ...".] 110433FC0 024E4BFE 31322F31 32303639 07787005 [.NK.12/12069.xp.] 110433FD0 19101A35 272F6F72 61636C65 2F61646D [...5'/oracle/adm] 110433FE0 696E2F6F 72636C2F 6264756D 702F616C [in/orcl/bdump/al] 110433FF0 6572745F 6F72636C 2E6C6F67 D0460601 [ert_orcl.log.F..] Block header dump: 0x0b0ae6ac Object id on Block Y seg/obj: 0x58fcc csc: 0x12.4a18d044 itc: 1 flg: E typ: 2 - INDEX brn: 0 bdba: 0xb0ae6a9 ver: 0x01 opc: 0 inc: 0 exflg: 0 Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x0006.006.000492f3 0x008130ca.aee2.01 -BU- 1 fsc 0x0000.4a18d046 Branch block dump ================= header address 4567801932=0x11043204c kdxcolev 2 KDXCOLEV Flags = - - - kdxcolok 1 kdxcoopc 0x83: opcode=3: iot flags=--- is converted=Y kdxconco 2 kdxcosdc 2 kdxconro 1 kdxcofbo 30=0x1e kdxcofeo 8048=0x1f70 kdxcoavs 8018 --kdxbrlmc 185672316=0xb11227c kdxbrsno 491 kdxbrbksz 8056 kdxbr2urrc 0 --row#0[8048] dba: 185672320=0xb112280 col 0; len 2; (2): 4e 4b col 1; TERM ----- end of branch block dump ----- End dump data blocks tsn: 4 file#: 44 minblk 714412 maxblk 714412
dump leaf block:
SQL> SELECT DBMS_UTILITY.DATA_BLOCK_ADDRESS_BLOCK(185263789) FROM DUAL;

DBMS_UTILITY.DATA_BLOCK_ADDRESS_BLOCK(185263789)
------------------------------------------------
                                          714413

SQL> alter system dump datafile 44 block 714413;

系统已更改。
tracefile 内容:
*** 2013-12-13 12:20:29.107
Start dump data blocks tsn: 4 file#: 44 minblk 714413 maxblk 714413
buffer tsn: 4 rdba: 0x0b0ae6ad (44/714413)
scn: 0x0012.4a19790f seq: 0x01 flg: 0x06 tail: 0x790f0601
frmt: 0x02 chkval: 0xcff9 type: 0x06=trans data
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x0000000110432000 to 0x0000000110434000
110432000 06A20000 0B0AE6AD 4A19790F 00120106  [........J.y.....]
110432010 CFF90000 02000000 00058FCC 4A19790E  [............J.y.]
110432020 00120058 00023200 0B0AE6A9 00060000  [...X..2.........]
110432030 00049288 008128AC AEE10100 C0000012  [......(.........]
...
110433FB0 E8BB01CC 00000641 41565A4F 45060B0A  [.......AAVZOE...]
110433FC0 E74200A1 0717021C 3C020F02 C10602C1  [.B......<.......]
110433FD0 120D7871 0B081701 0B21A1DD 001C3C02  [..xq.....!....<.]
110433FE0 C10B02C1 0B018001 80018001 80FFFF01  [................]
110433FF0 800180FF 0778710B 0717021C 790F0601  [.....xq.....y...]
Block header dump:  0x0b0ae6ad
 Object id on Block  Y
 seg/obj: 0x58fcc  csc: 0x12.4a19790e  itc: 2  flg: E  typ: 2 - INDEX
     brn: 0  bdba: 0xb0ae6a9 ver: 0x01 opc: 0
     inc: 0  exflg: 0
 
 Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
0x01   0x0006.000.00049288  0x008128ac.aee1.01  CB--    0  scn 0x0012.4a184c24
0x02   0x0008.025.0003bd64  0x00813810.8882.06  --U-    1  fsc 0x0000.4a19790f
 
Leaf block dump
===============
header address 4567801956=0x110432064
kdxcolev 0
KDXCOLEV Flags = - - -
kdxcolok 0
kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y
kdxconco 2
kdxcosdc 10
kdxconro 317
kdxcofbo 670=0x29e
kdxcofeo 2960=0xb90
kdxcoavs 2290
kdxlespl 0
kdxlende 0
kdxlenxt 185672019=0xb112153
kdxleprv 0=0x0
kdxledsz 0
kdxlebksz 8032
row#0[3712] flag: ------, lock: 0, len=16
col 0; len 6; (6):  41 41 41 42 43 53
col 1; len 6; (6):  0b 11 22 f9 00 95
row#1[4464] flag: ------, lock: 0, len=16
col 0; len 6; (6):  41 41 41 43 47 4c
col 1; len 6; (6):  0b 0a e8 94 00 20
...
row#315[8000] flag: ------, lock: 0, len=16
col 0; len 6; (6):  41 41 56 58 58 44
col 1; len 6; (6):  0b 0a e8 bb 01 cc
row#316[8016] flag: ------, lock: 0, len=16
col 0; len 6; (6):  41 41 56 5a 4f 45
col 1; len 6; (6):  0b 0a e7 42 00 a1
----- end of leaf block dump -----
End dump data blocks tsn: 4 file#: 44 minblk 714413 maxblk 714413

tracefile格式解析:
块头区域:
rdba:相对数据块地址
scn : 修改块的最后scn号
seq: 在当前scn号下,数据块改变的次序
tail: scn的最后两个字节
frmt: 数据块的格式 (02 represents a post Oracle8 block format, A2 10g format)
chkval: 校验和
type: 06 transactional data block type (table/index/cluster)
Hex dump of block: only displayed on later versions of Oracle
seg/obj object id
csc: commit/cleanout SCN
itc: interested transaction count (defaults 1 branch block, 2 leaf blocks)
typ block type (2 index)
Itl Interested Transaction Location:
Itl: slot id,
Xid: transaction id,
Uba: undo block address,
Flag : state of current transaction (C Committed)
Lck : number of locks help by current transaction
Scn/Fsc: scn /fsc of current transaction


kdxcolev: index level (0 represents leaf blocks)
kdxcolok: denotes whether structural block transaction is occurring
kdxcoopc: internal operation code
kdxconco: index column count
kdxcosdc: count of index structural cha