append 与 Highwater 测试
2008-06-03 12:43:08 来源:WEB开发网从 type 中,可以看到第一个块是数据段的头信息。我们看一下这里的高水位标识(Highwater):
SQL> select to_number('c3', 'xxxxxxxxxx') Highwater
2 from dual;
HIGHWATER
----------
195
现在高水位是在195块,我再插入一条数据看看:
SQL> insert into test_block select * from dba_objects where rownum = 1;
已创建 1 行。
SQL> select dbms_rowid.rowid_block_number(rowid) block# from test_block;
BLOCK#
----------
194
194
194
194
194
194
194
194
194
194
194
已选择12行。
SQL> rollback;
回退已完成。
SQL> insert/*+ append */ into test_block select * from dba_objects where rownum = 1;
已创建 1 行。
SQL> select dbms_rowid.rowid_block_number(rowid) block# from test_block;
select dbms_rowid.rowid_block_number(rowid) block# from test_block
*
ERROR 位于第 1 行:
ORA-12838: 无法在并行模式下修改之后读/修改对象
SQL> alter system dump datafile 11 block 193;
系统已更改。
此时193块信息如下:
*** 2008-05-30 11:48:21.000
*** SESSION ID:(11.7) 2008-05-30 11:48:21.000
Start dump data blocks tsn: 11 file#: 11 minblk 193 maxblk 193
buffer tsn: 11 rdba: 0x02c000c1 (11/193)
scn: 0x0000.1bf3af2f seq: 0x01 flg: 0x04 tail: 0xaf2f1001
frmt: 0x02 chkval: 0x2339 type: 0x10=DATA SEGMENT HEADER - UNLIMITED
Extent Control Header
-----------------------------------------------------------------
Extent Header:: spare1: 0 spare2: 0 #extents: 1 #blocks: 7
last map 0x00000000 #maps: 0 offset: 4128
Highwater:: 0x02c000c3 ext#: 0 blk#: 1 ext size: 7
#blocks in seg. hdr's freelists: 1
#blocks below: 1
mapblk 0x00000000 offset: 0
Unlocked
Map Header:: next 0x00000000 #extents: 1 obj#: 31997 flag: 0x40000000
Extent Map
-----------------------------------------------------------------
0x02c000c2 length: 7
nfl = 1, nfb = 1 typ = 1 nxf = 0 ccnt = 1
SEG LST:: flg: USED lhd: 0x02c000c2 ltl: 0x02c000c2
End dump data blocks tsn: 11 file#: 11 minblk 193 maxblk 193
赞助商链接