Number of tables(>1 in clusters)
----b2 kdbhnrow
Number of rows( 记录删除后,并不会立即在数据块中清除记录数据,仅仅是将记录标记为已删除,等真正需要已删除记录的空间时才会真正删除记录,此时kdbhnrow 的值才会发送变化)
-----sb2 kdbhfree
First free row entry index;-1=you have to add one
---sb2 kdbhfsbo
Freespace begin offset
----sb2 kdbhfseo
Freespace end offset
----b2 kdbhavsp
Available space in the block
-----b2 kdbhtosp
Total available space when all TXs commit
Struct kdbt[1],4 bytes
Table directory entry structure
---b2 kdbtoffs
----b2 kdbtnrow
Sb2 kdbr[1](1指记录的数量)
Row directory, kdbr中的每条记录存储的是数据记录在数据块中的偏移量,该偏移量是针对kdbh计算的
Ub1 freespace[8030]
Free space
Ub1 rowdata[38](38指记录占据字节数量)
Row data
Ub4 tailchkdocs
The tial of an oracle 8+ block is a concatenationof the lower order two bytes of the scn base,the block type and the scn sequence number.although the tail check value is generated form three components, oracle treats the final value as a single unsigned integer stored as a word(4 bytes). On litter-endian architecture machines,which include intel the value will stores as low-order byte first..e,g A tail check of 0x97280602 stored on an intl machine would be wirtten to disk as 02062897.
Dump
Dump命令将数据块在内存中的数据按照地址由低到高的顺序以十六进制形式展现到屏幕上,通过/v选项,可以显示更为详细的内容。可以直接指定需要dump的数据块,也可以dump当前的数据块。Dump命令展现的数据量是由count选项指定的,默认值是512bytes。
BBED> show all FILE# 5 BLOCK# 20 OFFSET 0 DBA 0x01400014 (20971540 5,20) FILENAME /home/app/oraten/oradata/oraten/tbs101.dbf BIFILE bifile.bbd LISTFILE /home/oraten/filelist.txt BLOCKSIZE 8192 MODE Edit EDIT Unrecoverable IBASE Dec OBASE Dec WIDTH 80 COUNT 512 LOGFILE log.bbd SPOOL No BBED> find /c nnn File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8169 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e6e6e2c 000202c1 0301622c 000202c1 02016101 06aee7 <32 bytes per line> BBED> dump File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8169 to 8191 Dba:0x01400014 ------------------------------------------------------------------------ 6e6e6e2c 000202c1 0301622c 000202c1 02016101 06aee7 <32 bytes per line> BBED> dump /v File: /home/app/oraten/oradata/oraten/tbs101.dbf (5) Block: 20 Offsets: 8169 to 8191 Dba:0x01400014 ------------------------------------------------------- 6e6e6e2c 000202c1 0301622c 000202c1 l nnn,......b,.... 02016101 06aee7 l ..a.... <16 bytes per line>PRINT
Print命令比较复杂一些,在某种程度上print命令和map命令是异曲同工的。只是map命令显示的是整个数据块的结构,而print显示的是当前offset位置下的数据结构,print命令侧重于以raw格式显示数据块的数据结构(显示格式并不是在内存中的存储格式,不受大小尾的影响,例如以p tailchk命令和dump命令显示的tailchk内容在字节顺序上是不一样的),而下面的example命令侧重于显示数据内容。我们可以向print提供两类参数,一类是offset,另一类是数据块内数据结构的名称。当我们指定offset时,print命令显示当前offset下的数据结构,如
BBED> show all FILE# 5 BLOCK# 20 OFFSET 0 DBA 0x01400014 (20971540 5,20) FILENAME /home/app/oraten/oradata/oraten/tbs101.dbf BIFILE bifile.bbd LISTFILE /home/oraten/filelist.txt BLOCKSIZE 8192 MODE Edit EDIT Unrecoverable IBASE Dec OBASE Dec WIDTH 80 COUNT 512 LOGFILE log.bbd SPOOL No BBED> p kcbh.type_kcbh -------------- ub1 type_kcbh @0 0x06
我们也可以在数据结构名称前使用*符合来打印数据结构指针所指向的offset,如
BBED> p kdbr (这是第二类用法,即指定数据结构名称)
sb2 kdbr[0] @118 8062