今天学习了block,供大家参考

[复制链接]
查看11 | 回复3 | 2006-9-7 17:03:51 | 显示全部楼层 |阅读模式
根据grassbell 的一篇文章,我也学了一下,还参考了scalingoracle8i的data storage。

Start dump data blocks tsn: 0(表空间) file#: 1(数据文件ID) minblk 24762(块ID) maxblk 24762
buffer tsn: 0 rdba: 0x004060ba (1/24762)(0x004060ba十六进制,二进制位代表(32位,前面不足添0补充)00 0000 0001(file id)0000000110000010111010 (blockid)
scn: 0x0000.00040bad seq: 0x01 flg: 0x02 tail: 0x0bad0601
frmt: 0x02 chkval: 0x0000 type: 0x06=trans data( 1=undo segment header block; 2=undo data block; 5= data segment header block; 6=data block)
Block header dump:0x004060ba
Object id on Block? Y(一直都是Y)
seg/obj: 0x18bc(十六进制,对应dba_objects object_id)

csc: 0x00.40732(什么时候块头上的事务被清除的)itc: 2(块上事务个数)flg: O(在freelist下,-表示freelist上)typ: 1 - DATA(1=data; 2=index)
fsl: 0fnx: 0x0 ver: 0x01

Itl Xid
Uba FlagLckScn/Fsc
0x01 0x000a.004.000000380x0080219c.0015.34C---0scn 0x0000.0004070d
0x02 0x0001.023.000000390x00801fd0.0015.1d--U-6fsc 0x0000.00040bad
(
---- = 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)
data_block_dump,data header at 0x3bf825c
===============
tsiz: 0x1fa0
hsiz: 0x1e
pbl: 0x03bf825c(pointer to buffer holding the block)
bdba: 0x004060ba
76543210 (block dba / rdba)
flag=--------
ntab=1(表的数量,争对cluster而言)
nrow=6(这个块上的记录数)
frre=-1
fsbo=0x1e (free space begin offset)
fseo=0x1f8c (free space end offset)
avsp=0x1f4c(available space in the block)
tosp=0x1f4c(total available space when all transactions commit)
(row directory)
0xe

ti[0]
nrow=6(6行数据)
offs=0
0x12

ri[0]
offs=0x1f9b(偏移量)
0x14

ri[1]
offs=0x1f98
0x16

ri[2]
offs=0x1f95
0x18

ri[3]
offs=0x1f92
0x1a

ri[4]
offs=0x1f8f
0x1c

ri[5]
offs=0x1f8c
block_row_dump:
tab 0, row 0, @0x1f9b (3bytes row header )
tl: 5 fb: --H-FL-- lb: 0x2 (b: 0x2 表示transaction 0x2)cc: 1(这列的数量)
col0: [ 1]61 ==============>(column length(1 byte if length<250; otherwise 3 bytes) and values)
tab 0, row 1, @0x1f98
tl: 3 fb: --H-FL-- lb: 0x2cc: 0
tab 0, row 2, @0x1f95
tl: 3 fb: --H-FL-- lb: 0x2cc: 0
tab 0, row 3, @0x1f92
tl: 3 fb: --H-FL-- lb: 0x2cc: 0
tab 0, row 4, @0x1f8f
tl: 3 fb: --H-FL-- lb: 0x2cc: 0
tab 0, row 5, @0x1f8c
tl: 3 fb: --H-FL-- lb: 0x2cc: 0
end_of_block_dump
回复

使用道具 举报

千问 | 2006-9-7 17:03:51 | 显示全部楼层
學習中
回复

使用道具 举报

千问 | 2006-9-7 17:03:51 | 显示全部楼层
好!
有个问题:
csc: 0x00.40732(什么时候块头上的事务被清除的)
这个是什么?时间点吗?还是SCN
回复

使用道具 举报

千问 | 2006-9-7 17:03:51 | 显示全部楼层
Cleanout SCN(csc): 占用6bytes,最后一次 full cleanout 的scn
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行