赞
踩
Data block 内部结构的解析(转载gyj_hobby的文章)
地址:http://www.itpub.net/thread-1747870-1-1.html
帖子共四部分,回答皆是gyj_hobby,感谢gyj_hobby的分享与答疑
第一部分:
Data Block是数据库中最小的I/O单元,下面我来简单介绍下数据块的基本结构。
OK!跟着我一步步实验:
一、建表空间
SQL>create tablespace tp1 datafile '/oradata/bxocp/tp01.dbf' size 10M;
二、建用户及授权
SQL>create user gyj identified by gyj default tablespace tp1;
SQL>grant dba to gyj;
三、建表
SQL>conn gyj/gyj
SQL>create table t1 (id int,name varchar2(100));
四、插入一行数据
SQL>insert into t1 values(1,'AAAAA');
SQL>commit;
五、手动发生一个检查点,使上面一行数据写到数据文件
alter system checkpoint;
六、查这行数据所在的文件号和块号
SQL>col name for a10
SQL>select id,name,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block# from t1;
ID NAME FILE# BLOCK#
---------- --------- ---------- ----------
1 AAAAA 6 135
七、转储6号文件135号块,新开个窗口
[oracle@guoyj ~]$ sqlplus / as sysdba
SQL> alter system dump datafile 6 block 135;
八、找到转储的文件
SQL> show parameter dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_core_dump string partial
background_dump_dest string /u01/app/oracle/diag/rdbms/bxo
cp/bxocp/trace
再开一新窗口
[oracle@guoyj ~]$ cd /u01/app/oracle/diag/rdbms/bxocp/bxocp/trace
[oracle@guoyj trace]$ ls -lFtr
下面这个跟踪日志就是6号文件135号块转储出来的数据块信息
-rw-r----- 1 oracle oinstall 3363 Dec 11 18:02 bxocp_ora_5429.trc -
九、分析数据块结构
[oracle@guoyj trace]$ vi bxocp_ora_5429.trc
Trace file /u01/app/oracle/diag/rdbms/bxocp/bxocp/trace/bxocp_ora_5429.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0
System name: Linux
Node name: guoyj
Release: 2.6.18-128.el5
Version: #1 SMP Wed Dec 17 11:41:38 EST 2008
Machine: x86_64
VM name: VMWare Version: 6
Instance name: bxocp
Redo thread mounted by this instance: 1
Oracle process number: 28
Unix process pid: 5429, image: oracle@guoyj (TNS V1-V3)
*** 2012-12-11 18:02:31.307
*** SESSION ID:(29.15) 2012-12-11 18:02:31.307
*** CLIENT ID:() 2012-12-11 18:02:31.307
*** SERVICE NAME:(SYS$USERS) 2012-12-11 18:02:31.307
*** MODULE NAME:(sqlplus@guoyj (TNS V1-V3)) 2012-12-11 18:02:31.307
*** ACTION NAME:() 2012-12-11 18:02:31.307
Start dump data blocks tsn: 7 file#:6 minblk 135 maxblk 135
Block dump from cache:
Dump of buffer cache at level 4 for tsn=7 rdba=25165959
BH (0x7f3f6958) file#: 6 rdba: 0x01800087 (6/135) class: 1 ba: 0x7f33a000
set: 3 pool: 3 bsz: 8192 bsi: 0 sflg: 1 pwc: 103,28
dbwrid: 0 obj: 76987 objn: 76987 tsn: 7 afn: 6 hint: f
hash: [0x908b5100,0x908b5100] lru: [0x7f3f6910,0x7f3f6b70]
ckptq: [NULL] fileq: [NULL] objq: [0x7f3f6938,0x8d148e00] objaq: [0x7f3f6948,0x8d148df0]
st: XCURRENT md: NULL fpin: 'ktspbwh2: ktspfmdb' tch: 3
flags: block_written_once redo_since_read
LRBA: [0x0.0.0] LSCN: [0x0.0] HSCN: [0xffff.ffffffff] HSUB: [1]
Block dump from disk:
buffer tsn: 7 rdba: 0x01800087 (6/135) scn: 0x0000.0015a3eb seq: 0x01 flg: 0x06 tail: 0xa3eb0601frmt: 0x02 chkval: 0xec19 type: 0x06=trans data |
Hex dump of block: st=0, typ_found=1
Dump of memory from 0x00002B70E9566A00 to 0x00002B70E9568A00
2B70E9566A00 0000A206 01800087 0015A3EB 06010000 [................]
2B70E9566A10 0000EC19 00000001 00012CBB 0015A3EA [.........,......]
2B70E9566A20 00000000 0032F802 01800080 000F0004 [......2.........]
2B70E9566A30 00000346 00C00793 002200BB 00002001 [F.........".. ..]
2B70E9566A40 0015A3EB 00000000 00000000 00000000 [................]
2B70E9566A50 00000000 00000000 00000000 00000000 [................]
2B70E9566A60 00000000 00010100 0014FFFF 1F781F8C [..............x.]
2B70E9566A70 00001F78 1F8C0001 00000000 00000000 [x...............]
2B70E9566A80 00000000 00000000 00000000 00000000 [................]
Repeat 502 times
2B70E95689F0 0202012C 410502C1 41414141 A3EB0601 [,......AAAAA....]
1.数据块头
Block header dump: 0x01800087 Object id on Block? Y seg/obj: 0x12cbb csc: 0x00.15a3ea itc: 2 flg: E typ: 1 - DATA brn: 0 bdba: 0x1800080 ver: 0x01 opc: 0 inc: 0 exflg: 0 |
seg/obj: 0x12cbb --16进制转成10进制76987
SQL> select object_id from dba_objects where object_name='T1' and wner='GYJ';
OBJECT_ID
----------
76987
csc: 0x00.15a3ea --cleanoutSCN,块清除时的SCN
itc: 2 --指向第二个事务槽
flg: E --指用的是ASSM,如果是O表示用的是free list
typ: 1 - DATA --类型是数据
2.事务槽
Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x0004.00f.00000346 0x00c00793.00bb.22 --U- 1 fsc 0x0000.0015a3eb 0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 |
Itl: ITL事务槽号的流水编号
Xid:transac[X]tion identified(事务ID),由und的段号+undo的槽号+undo槽号的覆盖次数三部分组成
Uba:undo block address记录了最近一次的该记录的前镜像(修改前的值)
Flag:C是提交,U是快速提交,---是未提交
Lck:锁住了几行数据,对应有几个行锁
Scn/Fsc:Scn=SCN of commited TX; Fsc=Free space credit(bytes)
这里fsc 0x0000.0015a3eb是指提交的scn,这个值大于上次清除块时的scn=csc: 0x00.15a3ea(此scn是这个块中最小的SCN of commited)
3.用户数据头
bdba: 0x01800087 data_block_dump,data header at 0x2b70e9566a64 =============== tsiz: 0x1f98 hsiz: 0x14 pbl: 0x2b70e9566a64 76543210 flag=-------- ntab=1 nrow=1 frre=-1 fsbo=0x14 fseo=0x1f8c avsp=0x1f78 tosp=0x1f78 0xe:pti[0] nrow=1 offs=0 0x12:pri[0] offs=0x1f8c |
bdba: 0x01800087 -- 数据块的地址:16进制转成2进制取前10位二进制为文件号0000 0001 1000 ..... 0000000110=5号文件,后面剩于的部分表示块号,0X87转成10进制为135号块
tsiz: 0x1f98 --top of size 块的总大小即8088个字节
hsiz: 0x14 --Data header size 数据头大小即20个字节
pbl: 0x2b70e9566a64 --Pointer to buffer holding the block
76543210
flag=-------- N=pcrfree hit(clusters);F=do not put on free list;K=flushable cluster keys
ntab=1 --表示这个块的数据在一个表(如果是聚簇表就有可能是2或2以上)
nrow=1 --表示这个表有一行数据
frre=-1 -- The first free row entry in the row directory=you have to add one
fsbo=0x14 -- Free space begin offset可以存放数据空间的起始位置
fseo=0x1f8c -- Free space end offset可以存放数据空间的结束位置
avsp=0x1f78 --Available space for new entries
tosp=0x1f78 --Total space
0xe:pti[0] nrow=1 offs=0 --Table directory,整个表的开始,共一行数据
0x12:pri[0] offs=0x1f8c --Row index,行的开始,第一行的位置
4.用户数据
block_row_dump: tab 0, row 0, @0x1f8c tl: 12 fb: --H-FL-- lb: 0x1 cc: 2 col 0: [ 2] c1 02 col 1: [ 5] 41 41 41 41 41 end_of_block_dump End dump data blocks tsn: 7 file#: 6 minblk 135 maxblk 135 |
tab 0, row 0, @0x1f8c --第一个表第一行的位置
tl: 12 fb: --H-FL-- lb: 0x1 cc: 2 --行头,tl: 12行长度12个字节,
fb: (Flag byte)--H-FL指H(Head piece of row)F(First data piece) L(Last data piece)
lb: 0x1 --Lock byte和上面的ITL的lck相对应,表示这行是否被lock了
cc: 2 --表示有两列,即这个表有两个字段
col 0: [ 2] c1 02 --第一行的第一个字段长度和值
col 1: [ 5] 41 41 41 41 41 --第一行的第二个字段长度和值
把字符转成16进制
SQL> select * from t1;
ID NAME
------ ---- -----
1 AAAAA
SQL> select dump(01,'16') from dual;
DUMP(01,'16')
-----------------
Typ=2 Len=2: c1,2
SQL> select dump('AAAAA','16') from dual;
DUMP('AAAAA','16')
----------------------------
Typ=96 Len=5: 41,41,41,41,41
反过来把16进制转成字符
SQL> select chr(to_number(substr(replace('41 41 41 41 41',' '),2*rownum-1,2),'xxxxxxxx')) from dba_objects where rownum<=5;
CH
--
A
A
A
A
A
不过对数值类型的不能这样转化,要写过比较复杂的过程把各种字符都考虑进去。。。
数据块的最后四字节tail: 0xa3eb0601=scnBASE+flg+seq,如果不相等会报块损坏!!!
scn: 0x0000.0015a3eb seq: 0x01 flg: 0x06
第二部分:
flg: E --指用的是ASSM,如果是O表示用的是free list
这个确认吗?
是的,我实验一个MSSM的表空间给你看
SQL> create tablespace tp2 datafile '/oradata/bxocp/tp2.dbf' size 10M segment space management manual;
Tablespace created.
SQL> show user;
USER is "GYJ"
SQL> create table t2 (id int,name varchar2(10)) tablespace tp2;
Table created.
SQL> insert into t2 values(2,'BBBBB');
1 row created.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid) from t2;
DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
------------------------------------ ------------------------------------
7 129
SQL> alter system dump datafile 7 block 129;
System altered.
vi vi bxocp_ora_29633.trc
转储部分内容:看红色字体
Object id on Block? Y
seg/obj: 0x12ccb csc: 0x00.16ee66 itc: 2 flg: O typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0008.009.00000414 0x00c00130.00b8.03 --U- 1 fsc 0x0000.0016ee67
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
bdba: 0x01c00081
data_block_dump,data header at 0x2b8e96fa2a5c
===============
tsiz: 0x1fa0
hsiz: 0x14
pbl: 0x2b8e96fa2a5c
76543210
flag=--------
ntab=1
nrow=1
frre=-1
fsbo=0x14
fseo=0x1f94
avsp=0x1f80
tosp=0x1f80
0xe:pti[0] nrow=1 offs=0
0x12:pri[0] offs=0x1f94
block_row_dump:
tab 0, row 0, @0x1f94
tl: 12 fb: --H-FL-- lb: 0x1 cc: 2
col 0: [ 2] c1 03
col 1: [ 5] 42 42 42 42 42
end_of_block_dump
End dump data blocks tsn: 8 file#: 7 minblk 129 maxblk 129
查ASSM/MSSM的表空间
SQL> select tablespace_name,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces;
TABLESPACE_NAME SEGMEN
------------------------------ ------
SYSTEM MANUAL
SYSAUX AUTO
UNDOTBS1 MANUAL
TEMP MANUAL
USERS AUTO
EXAMPLE AUTO
TP1 AUTO
TP2 MANUAL
第三部分:
cc59 发表于 2012-12-15 21:20
o: on free list
E: bitmap seg
Object id on Block? Y
seg/obj: 0x12cbb csc: 0x00.15a3ea itc: 2 flg: E typ: 1 - DATA
brn: 0 bdba: 0x1800080 ver: 0x01 opc: 0
inc: 0 exflg: 0
数据块的分类(class#):
1: data block
2: sort block
4: segment header block
8: 1st level bmp block
9: 2nd level bmp block
10: 3rd level bmp block
flg indicates that the block is on a freelist.Otherwise the flag is 9i的ASSM的情况下这个值为E
note:when looking at blocks stored in tablespaces using auto segment space management,the freelist slot(fsl) and next block pointer(fnx) are replaced withr dba range number,opcode,first bitmap address and incarnation number of the bock
第四部分:
vage 发表于 2012-12-15 22:48
既然已经走到这一步,LZ再为大家总结下块内空间的使用规则吧,比如有A、B、C三行,B行被Update,空间增大, ...
1.创建表并插入三行记录
SQL> create table t1 (id varchar2(10),name varchar2(1000)) pctfree 98;
Table created.
SQL> insert into t1 values(1,'A');
1 row created.
SQL> insert into t1 values(2,'B');
1 row created.
SQL> insert into t1 values(3,'C');
1 row created.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select id,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid)
block#,dbms_rowid.rowid_row_number(rowid) row# from t1;
ID FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
1 6 327 0
2 6 327 1
3 6 327 2
2.再开一个窗口转储6号文件327号块
SQL> SQL> alter system dump datafile 6 block 327;
System altered.
3.dump出的内容如下:
Block header dump: 0x01800147
Object id on Block? Y
seg/obj: 0x12dd5 csc: 0x00.54bdd5 itc: 2 flg: E typ: 1 - DATA
brn: 0 bdba: 0x1800140 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0005.008.000009c2 0x00c000c5.00e4.34 --U- 3 fsc 0x0000.0054bde0
0x02 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
bdba: 0x01800147
data_block_dump,data header at 0x2b9fde2d9a64
===============
tsiz: 0x1f98
hsiz: 0x18
pbl: 0x2b9fde2d9a64
76543210
flag=--------
ntab=1
nrow=3
frre=-1
fsbo=0x18
fseo=0x1f83
avsp=0x1f65
tosp=0x1f65
0xe:pti[0] nrow=3 offs=0
0x12:pri[0] offs=0x1f91
0x14:pri[1] offs=0x1f8a
0x16:pri[2] offs=0x1f83
block_row_dump:
tab 0, row 0, @0x1f91
tl: 7 fb: --H-FL-- lb: 0x1 cc: 2
col 0: [ 1] 31
col 1: [ 1] 41
tab 0, row 1, @0x1f8a
tl: 7 fb: --H-FL-- lb: 0x1 cc: 2
col 0: [ 1] 32
col 1: [ 1] 42
tab 0, row 2, @0x1f83
tl: 7 fb: --H-FL-- lb: 0x1 cc: 2
col 0: [ 1] 33
col 1: [ 1] 43
end_of_block_dump
End dump data blocks tsn: 7 file#: 6 minblk 327 maxblk 327
4.接着修改id=2这行,把原来1个B改成100个B,使行长度变长,观察rowid是不是会变?
SQL> update t1 set name=lpad('B',100,'B') where id=2;
1 row updated.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select id,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid)
block#,dbms_rowid.rowid_row_number(rowid) row# from t1;
ID FILE# BLOCK# ROW#
---------- ---------- ---------- ----------
1 6 327 0
2 6 327 1
3 6 327 2
5.再次dump
Object id on Block? Y
seg/obj: 0x12dd5 csc: 0x00.54befa itc: 2 flg: E typ: 1 - DATA
brn: 0 bdba: 0x1800140 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0005.008.000009c2 0x00c000c5.00e4.34 C--- 0 scn 0x0000.0054bde0
0x02 0x0009.015.000009cb 0x00c00519.010f.01 --U- 1 fsc 0x0000.0054befc
bdba: 0x01800147
data_block_dump,data header at 0x2b52b8bf4a64
===============
tsiz: 0x1f98
hsiz: 0x18
pbl: 0x2b52b8bf4a64
76543210
flag=--------
ntab=1
nrow=3
frre=-1
fsbo=0x18
fseo=0x1f19
avsp=0x1f04
tosp=0x1f04
0xe:pti[0] nrow=3 offs=0
0x12:pri[0] offs=0x1f91
0x14:pri[1] offs=0x1f19
0x16:pri[2] offs=0x1f83
block_row_dump:
tab 0, row 0, @0x1f91
tl: 7 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [ 1] 31
col 1: [ 1] 41
tab 0, row 1, @0x1f19
tl: 106 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [ 1] 32
col 1: [100]
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
tab 0, row 2, @0x1f83
tl: 7 fb: --H-FL-- lb: 0x0 cc: 2
col 0: [ 1] 33
col 1: [ 1] 43
end_of_block_dump
End dump data blocks tsn: 7 file#: 6 minblk 327 maxblk 327
对修改前B值的两次dump的内容比较
修改前
tab 0, row 1, @0x1f8a
tl: 7 fb: --H-FL-- lb: 0x1 cc: 2
col 0: [ 1] 32
col 1: [ 1] 42
修改后
tab 0, row 1, @0x1f19
tl: 106 fb: --H-FL-- lb: 0x2 cc: 2
col 0: [ 1] 32
col 1: [100]
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
修改前和修改后row=1,说明行号都没变。即rowid没变!但他们在块中的偏移量(@0x1f8a,@0x1f19)变了?
再来个实验,验证一下行迁移,rowid会不会变?把A值再加大。
1.重新建个表,插入四行数据
SQL> drop table t2;
Table dropped.
SQL> create table t2 (id varchar2(10),name varchar2(4000));
Table created.
SQL> insert into t2 values(1,lpad('A',2000,'A'));
1 row created.
SQL> insert into t2 values(2,lpad('B',2000,'B'));
1 row created.
SQL> insert into t2 values(3,lpad('C',2000,'C'));
1 row created.
SQL> insert into t2 values(4,lpad('D',1000,'D'));
1 row created.
SQL> commit;
Commit complete.
SQL> alter system checkpoint;
System altered.
SQL> select id,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_row_number(rowid) from t2;
ID DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) DBMS_ROWID.ROWID_ROW_NUMBER(ROWID)
---------- ------------------------------------ ------------------------------------ ----------------------------------
1 6 359 0
2 6 359 1
3 6 359 2
4 6 359 3
2.转储6号文件的359号块
alter system dump datafile 6 block 359;
转储的内容,取A的dump信息:
data_block_dump,data header at 0x2adb08d6ba64
===============
tsiz: 0x1f98
hsiz: 0x1a
pbl: 0x2adb08d6ba64
76543210
flag=--------
ntab=1
nrow=4
frre=-1
fsbo=0x1a
fseo=0x420
avsp=0x406
tosp=0x406
0xe:pti[0] nrow=4 offs=0
0x12:pri[0] offs=0x17c0
0x14:pri[1] offs=0xfe8
0x16:pri[2] offs=0x810
0x18:pri[3] offs=0x420
block_row_dump:
tab 0, row 0, @0x17c0
tl: 2008 fb: --H-FL-- lb: 0x1 cc: 2
col 0: [ 1] 31
col 1: [2000]
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
3.加大A值
SQL> update t2 set name=lpad('A',4000,'A') where id=1;
1 row updated.
SQL> commit;
Commit complete. SQL> alter system checkpoint;
System altered.
SQL> select id,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_row_number(rowid) from t2;
ID DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) DBMS_ROWID.ROWID_ROW_NUMBER(ROWID)
---------- ------------------------------------ ------------------------------------ ----------------------------------
1 6 359 0
2 6 359 1
3 6 359 2
4 6 359 3
4.现次dump,取A值的信息很少
tab 0, row 0, @0x17c0
tl: 9 fb: --H----- lb: 0x2 cc: 0
nrid: 0x01800163.0
从上面dump信息显示A所在的位置还在6号文件的359号块,row 0(第一行),说明rowid不变,但A值在359块中没有了,多出一个 nrid: 0x01800163.0,这个应该是行迁移的地址吧
对这个值换算一下:0000 0001 10 = 6号文件,0x163=355号块 ,那么A值具体应该在这个块中。。。
再dump看一下是否有4000个A值
data_block_dump,data header at 0x2ab2112dea7c
===============
tsiz: 0x1f80
hsiz: 0x14
pbl: 0x2ab2112dea7c
76543210
flag=--------
ntab=1
nrow=1
frre=-1
fsbo=0x14
fseo=0xfd2
avsp=0xfbe
tosp=0xfbe
0xe:pti[0] nrow=1 offs=0
0x12:pri[0] offs=0xfd2
block_row_dump:
tab 0, row 0, @0xfd2
tl: 4014 fb: ----FL-- lb: 0x1 cc: 2
hrid: 0x01800167.0
col 0: [ 1] 31
col 1: [4000]
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41
end_of_block_dump
End dump data blocks tsn: 7 file#: 6 minblk 355 maxblk 355
hrid: 0x01800167.0 这个是上个块的地址换算成6号文件的359号块,就是rowid显示的这个块,不变
从以上的dump中看出A值就在355号新块中。。。
SQL> select dump('A',16) from dual;
DUMP('A',16)
----------------
Typ=96 Len=1: 41
从上面的几个实验可以看出,不管值变多长,我们在表中查的 rowid一直不变。。。。
SQL> select id,dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_row_number(rowid) from t2;
ID DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) DBMS_ROWID.ROWID_ROW_NUMBER(ROWID)
---------- ------------------------------------ ------------------------------------ ----------------------------------
1 6 359 0
2 6 359 1
3 6 359 2
4 6 359 3
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26442936/viewspace-753546/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26442936/viewspace-753546/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。