Oracle block的类型

我们知道,Oracle的最小IO单位是Block。在Oracle中,有多种block存在,比如file header block,segment header block,undo header block,data block,等等。那么,Oracle是根据什么来区别不同的block类型的呢?

每个Block的第一个字节就代表了该Block的类型。随着版本的进化,不断的有新的block类型产生,也有些旧的block类型消失。如果将每种block的内部存储结果弄清楚了,花点时间和耐心,要再写个dul也不是不可能的事情。

这两天抽空用c写了几行demo,基本上可以将普通的block dump出来,跟oracle自己提供的dump功能相似,只不过是可以脱机直接dump datafile的^_^

下表是从Ixora抄来的资料:


Code Block Type Versions
1 Undo header block (limited extents) all, but superseded by type 14 from 8.0
2 Undo data block all
3 Save undo header block (limited extents) all, but superseded by type 15 from 8.0
4 Save undo data block all
5 Data segment header block (limited extents, no freelist groups) all, but superseded by type 16 from 8.0
6 Table/cluster/index segment data block all
7 Temporary segment data block all
8 Sort key block all
9 Sort run block all
10 Free list block all, but superseded by type 22 from 8.0
11 Data file header block all
12 Data segment header block (limited extents, with freelist groups) all, but superseded by type 17 from 8.0
13 Compatibility segment all
14 Undo header block (unlimited extents) from 7.3
15 Save undo header block (unlimited extents) from 7.3
16 Data segment header block (unlimited extents, no freelist groups) from 7.3
17 Data segment header block (unlimited extents, with freelist groups) from 7.3
18 Extent map block from 7.3
19 Backup set piece header from 8.0
20 Backup set directory block from 8.0
21 Controlfile block from 8.0
22 Free list block with free block count from 8.0
23 LOB segment header block from 8.0
24 LOB segment freelist block from 8.0
25 LOB segment space usage index block from 8.0
26 LOB segment space usage bitmap block from 8.0
27 LOB segment chunk data block from 8.0
28 don't know
29 LMT space map header block from 8.1
30 LMT space map block from 8.1
31 don't know
32 ASSM level 1 bitmap block from 9.0
33 ASSM level 2 bitmap block from 9.0
34 ASSM level 3 bitmap block from 9.0
35 ASSM segment header block from 9.0
36 ASSM extent map block from 9.0
37 don't know
38 System managed undo header block from 9.0

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/193161/viewspace-50322/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/193161/viewspace-50322/

你可能感兴趣的:(Oracle block的类型)