全部博文(60)
分类: Oracle
2011-02-14 21:54:16
ID |
Type |
|
Decimal |
Hex |
|
1 11 12 14 15 16 17 18 23 29 32 33 34 35 36 37 |
0x01 0x0b 0x0c 0x0e 0x0f 0x10 0x11 0x12 0x17 0x1d 0x20 0x21 0x22 0x23 0x24 0x25 |
undo segment header data file header data segment header with FLG(Free List Group) block unlimited undo segment header unlimited save undo segment header unlimited data segment header unlimited data segment header with FLG blocks extent map block bitmapped segment header bitmapped file space header first level bitmap block second level bitmap block third level bitmap block Pagetable segment header block Pagetable extent map block System Managed Undo Extent Map Block |
0x0040fa89+5a=0x0040fae3 (5a 是90转换为16机制的值)
可以看到0x0040fae3刚好是HWM的位置。
最后一列:
没填数据之前:
SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000
填充数据之后:
SEG LST:: flg: USED lhd: 0x0040fade ltl: 0x0040fae2
flg(flag)表示该freelist是否被使用
lhd(list header)表示位于该list中的第一个可用block的dba
ltl(list tail)表示位于该list中的最后一个可用block的dba,这个block必定位于HWM之下,这这里HWM的地址是0x0040fae3,ltl的地址是0x0040fae2,刚好是HWM之下的块。从
0x0040fade到0x0040fae2一共有5个块在free list中。
我们删除一部分数据再dump出 Segment Header来看看:
SQL> delete from nico_t1 where rownum<20000;
19999 rows deleted.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@pgtest ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 28 12:58:54 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> alter system dump datafile 1 block 63017;
System altered.
SQL>