Set obase
设置bbed的输出格式,默认是10,可以设置为其他,如 hexBBED> set block 11 BLOCK# 0x0000000b BBED> set obase dec OBASE Dec BBED> set block 11 BLOCK# 11Set mode
设置bbed工作模式(查看模式、编辑模式)
SET SPOOL
尚未实现
Map
显示当前数据块的数据布局信息,使用/v选项可以获取详细信息。如
BBED> map
File: /home/app/oraten/oradata/oraten/tbs101.dbf (5)
Block: 20 Dba:0x01400014
------------------------------------------------------------
KTB Data Block (Table/Cluster)
struct kcbh, 20 bytes @0
struct ktbbh, 72 bytes @20
struct kdbh, 14 bytes @100
struct kdbt[1], 4 bytes @114
sb2 kdbr[2] @118
ub1 freespace[8040] @122
ub1 rowdata[26] @8162
ub4 tailchk @8188
BBED> map /v
File: /home/app/oraten/oradata/oraten/tbs101.dbf (5)
Block: 20 Dba:0x01400014
------------------------------------------------------------
KTB Data Block (Table/Cluster)
struct kcbh, 20 bytes @0
ub1 type_kcbh @0
ub1 frmt_kcbh @1
ub1 spare1_kcbh @2
ub1 spare2_kcbh @3
ub4 rdba_kcbh @4
ub4 bas_kcbh @8
ub2 wrp_kcbh @12
ub1 seq_kcbh @14
ub1 flg_kcbh @15
ub2 chkval_kcbh @16
ub2 spare3_kcbh @18
struct ktbbh, 72 bytes @20
ub1 ktbbhtyp @20
union ktbbhsid, 4 bytes @24
struct ktbbhcsc, 8 bytes @28
b2 ktbbhict @36
ub1 ktbbhflg @38
ub1 ktbbhfsl @39
ub4 ktbbhfnx @40
struct ktbbhitl[2], 48 bytes @44
struct kdbh, 14 bytes @100
ub1 kdbhflag @100
b1 kdbhntab @101
b2 kdbhnrow @102
sb2 kdbhfrre @104
sb2 kdbhfsbo @106
sb2 kdbhfseo @108
b2 kdbhavsp @110
b2 kdbhtosp @112
struct kdbt[1], 4 bytes @114
b2 kdbtoffs @114
b2 kdbtnrow @116
sb2 kdbr[2] @118
ub1 freespace[8040] @122
ub1 rowdata[26] @8162
ub4 tailchk @8188
下面来详细解释各个区间的数据内容,
| Structure /element |
description |
||||||||||||||||||||||
| Struct kcbh,20 bytes |
Block header structure |
||||||||||||||||||||||
| ---- ub1 type_kcbh |
Block type
|
||||||||||||||||||||||
| ---ub1 frmt_kcb |
Block format 1=oracle 7,2 =oracle 8+ |
||||||||||||||||||||||
| ---ub1 spare1_kcbh |
Not used |
||||||||||||||||||||||
| ---ub1 spare2_kchb |
Not used |
||||||||||||||||||||||
| ---ub4 rdba_kcbh |
Rdba- relative data block address |
||||||||||||||||||||||
| ---ub4 bas_kcbh |
Scn base |
||||||||||||||||||||||
| ----ub2 wrp_kcbh |
Scn wrap |
||||||||||||||||||||||
| ----ub1 seq_kcbh |
Sequence number,incremented for every change made to the block at the sam scn |
||||||||||||||||||||||
| ----ub1 flg_kcbh |
Flag: Ox01 new block 0x02 delayed logging change advanced scn/seq 0x04 check value saved - block XOR’s to zero 0x08 temporary block |
||||||||||||||||||||||
| ----ub2 chkval_kcbh |
Optional block checksun(if db_block_checksum=true) |
||||||||||||||||||||||
| -----ub2 spare3_kcbh |
Not used |
||||||||||||||||||||||
| Struct ktbbh ,72 bytes |
Transaction fixed header structure |
||||||||||||||||||||||
| ------ub1 ktbbhtyp |
Block type(1=data,2=index) |
||||||||||||||||||||||
| ------union ktbbhsid,4 bytes |
Segment/object id |
||||||||||||||||||||||
| ------struct ktbbhcsc,8 bytes |
Scn at last block cleanout |
||||||||||||||||||||||
| ------b2 ktbbhict |
Number of itl slots |
||||||||||||||||||||||
| ------ub1 ktbbhflg |
0=on the freelist |
||||||||||||||||||||||
| ------ub1 ktbbhfsl |
Itl tx freelist slot |
||||||||||||||||||||||
| ------ub4 ktbbhfnx |
Dba of next block on freelist |
||||||||||||||||||||||
| ------struct ktbbhitl[2],48 bytes |
Itl list index |
||||||||||||||||||||||
| Struct kdbh,14 bytes |
Data header structure |
||||||||||||||||||||||
| ---ub1 kdbhflag |
N=pctfree hit(clusters);F=do not put on freelist;K=flushable cluster keys |
||||||||||||||||||||||
| ---b |