- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-5-6 23:33:01
SQL> create table test( t1 number, t2 char(999), t3 date);
Table created.
SQL> insert into test values(999,'MACLEAN',sysdate);
1 row created.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select dbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_relative_fno(rowid) from test;
DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID)
------------------------------------ ------------------------------------
255042 1
SQL> alter system dump datafile 1 block 255042;
System altered.
SQL> oradebug setmypid;
Statement processed.
SQL> oradebug tracefile_name;
/s01/admin/G10R21/udump/g10r21_ora_8430.trc
data_block_dump,data header at 0x745765c
===============
tsiz: 0x1fa0
hsiz: 0x14
pbl: 0x0745765c
bdba: 0x0043e442
76543210
flag=--------
ntab=1
nrow=1
frre=-1
fsbo=0x14
fseo=0x1ba7
avsp=0x1b93
tosp=0x1b93
0xe:pti[0] nrow=1 offs=0
0x12:pri[0] offs=0x1ba7
block_row_dump:
tab 0, row 0, @0x1ba7
tl: 1017 fb: --H-FL-- lb: 0x1 cc: 3
col 0: [ 3] c2 0a 64
col 1: [999]
4d 41 43 4c 45 41 4e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
........................................
col 2: [ 7] 78 70 05 06 0c 10 26
end_of_block_dump
TL = flag( fb 1bytes ) + lock (lb 1bytes ) + cols(cc 1 bytes ) + col0 length (指记录col长度的) + col0 bytes + col1 length + col1 bytes + .........
在上例中 TL = 1 bytes + 1 bytes + 1 bytes + 1 bytes + 3bytes + 3 bytes + 999 bytes + 1 bytes + 7 bytes = 1017 bytes
block 本身并不记录 TL , 但是 block dump会列出TL
BBED> p *kdbr[0]
rowdata[0]
----------
ub1 rowdata[0] @7171 0x2c
BBED> x /r offset 7171
rowdata[0] @7171
----------
flag@7171: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@7172: 0x01
cols@7173: 3
col 0[3] @7174: 0xc2 0x0a 0x64
col 1[999] @7178: 0x4d 0x41 0x43 0x4c 0x45 0x41 0x4e 0x20 0x20 0x20
..........
col 2[7] @8180: 0x78 0x70 0x05 0x06 0x0c 0x10 0x26 |
|