关于Undo Internal的研究
2024-07-21 02:07:22
供稿:网友
本文来源于网页设计爱好者web开发社区http://www.html.org.cn收集整理,欢迎访问。
原文链接:
http://www.eygle.com/internal/undo_internal.htm
本文就undo的内部结构作初步探讨:
我们通过实验来看一下回滚段的内部结构.
测试脚本及过程如下:
首先创建一个测试表
create table ud ( n number );
insert into ud values(1);
insert into ud values(2);
commit;
然后执行一个事物:
select * from ud;
update ud set n=1000 where n=2;
select * from ud;
找到该事物使用的回滚段:
select xidusn,xidslot,xidsqn,ubablk,ubafil,ubarec from v$transaction;
获得回滚段名称并dump其内容:
select usn,name from v$rollname where usn=7;
alter system dump undo header '_syssmu7$';
以下开始测试:
sql> create table ud ( n number );table created.sql> insert into ud values(1);1 row created.sql> insert into ud values(2);1 row created.sql> commit;commit complete.sql> startup force;oracle instance started.total system global area 47256168 bytesfixed size 451176 bytesvariable size 29360128 bytesdatabase buffers 16777216 bytesredo buffers 667648 bytesdatabase mounted.database opened.sql> select usn,writes,rssize,xacts,hwmsize,shrinks,wraps from v$rollstat; usn writes rssize xacts hwmsize shrinks wraps---------- ---------- ---------- ---------- ---------- ---------- ---------- 0 7380 385024 0 385024 0 0 1 0 122880 0 122880 0 0 2 0 122880 0 122880 0 0 3 0 122880 0 122880 0 0 4 0 122880 0 122880 0 0 5 0 122880 0 122880 0 0 6 0 122880 0 122880 0 0 7 0 122880 0 122880 0 0 8 54 122880 0 122880 0 0 9 9040 122880 0 122880 0 0 10 210 122880 0 122880 0 011 rows selected.sql> select * from ud; n---------- 1 2sql> update ud set n=1000 where n=2;1 row updated.sql> select xidusn,xidslot,xidsqn,ubablk,ubafil,ubarec from v$transaction; xidusn xidslot xidsqn ubablk ubafil ubarec---------- ---------- ---------- ---------- ---------- ---------- 7 35 2861 109 2 28sql> select usn,writes,rssize,xacts,hwmsize,shrinks,wraps from v$rollstat; usn writes rssize xacts hwmsize shrinks wraps---------- ---------- ---------- ---------- ---------- ---------- ---------- 0 7380 385024 0 385024 0 0 1 0 122880 0 122880 0 0 2 0 122880 0 122880 0 0 3 0 122880 0 122880 0 0 4 0 122880 0 122880 0 0 5 0 122880 0 122880 0 0 6 0 122880 0 122880 0 0 7 126 122880 1 122880 0 0 8 54 122880 0 122880 0 0 9 9040 122880 0 122880 0 0 10 210 122880 0 122880 0 011 rows selected.sql> select usn,name from v$rollname where usn=7; usn name---------- ------------------------------ 7 _syssmu7$sql> alter system dump undo header '_syssmu7$';system altered.sql> @gettrcnametrace_file_name--------------------------------------------------------------------------------/opt/oracle/admin/hsjf/udump/hsjf_ora_3563.trc
找到这个trace文件:
********************************************************************************undo segment: _syssmu7$ (7)******************************************************************************** extent control header ----------------------------------------------------------------- extent header:: spare1: 0 spare2: 0 #extents: 2 #blocks: 15 last map 0x00000000 #maps: 0 offset: 4080 highwater:: 0x0080006d ext#: 0 blk#: 3 ext size: 7 #blocks in seg. hdr's freelists: 0 #blocks below: 0 mapblk 0x00000000 offset: 0 unlocked map header:: next 0x00000000 #extents: 2 obj#: 0 flag: 0x40000000 extent map ----------------------------------------------------------------- 0x0080006a length: 7 0x008000d1 length: 8 retention table ----------------------------------------------------------- extent number:0 commit time: 1095324259 extent number:1 commit time: 1095296201 trn ctl:: seq: 0x040d chd: 0x0025 ctl: 0x0024 inc: 0x00000000 nfb: 0x0000 mgc: 0x8201 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x0080006d.040d.1c scn: 0x0000.017e6e59version: 0x01 free block pool:: uba: 0x00000000.040d.1b ext: 0x0 spc: 0x994 uba: 0x00000000.040c.30 ext: 0x5 spc: 0xa1e uba: 0x00000000.040c.43 ext: 0x5 spc: 0x198 uba: 0x00000000.03ed.01 ext: 0x0 spc: 0x1fa0 uba: 0x00000000.0000.00 ext: 0x0 spc: 0x0 trn tbl::------transaction table,也就是这个回滚段中记录的事务列表 index state cflags wrap# uel scn dba parent-xid nub stmt_num ------------------------------------------------------------------------------------------------ 0x00 9 0x00 0x0b2d 0x0027 0x0000.017ea992 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x01 9 0x00 0x0b2d 0x0002 0x0000.017e9dba 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x02 9 0x00 0x0b2d 0x0004 0x0000.017ea1ad 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x03 9 0x00 0x0b2d 0x0001 0x0000.017e99c7 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x04 9 0x00 0x0b2d 0x0000 0x0000.017ea5a0 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x05 9 0x00 0x0b2d 0x000b 0x0000.017ebd50 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x06 9 0x00 0x0b2d 0x0005 0x0000.017eb95d 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x07 9 0x00 0x0b2d 0x000f 0x0000.017f1fa2 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x08 9 0x00 0x0b2d 0x0029 0x0000.017eccb8 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x09 9 0x00 0x0b2d 0x0008 0x0000.017ec8c5 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x0a 9 0x00 0x0b2d 0x0009 0x0000.017ec4d3 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x0b 9 0x00 0x0b2d 0x000a 0x0000.017ec0e0 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x0c 9 0x00 0x0b2d 0x0011 0x0000.017ed49e 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x0d 9 0x00 0x0b2d 0x0014 0x0000.017ee85b 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x0e 9 0x00 0x0b2d 0x001f 0x0000.017f000c 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x0f 9 0x00 0x0b2d 0x0024 0x0000.017f2394 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x10 9 0x00 0x0b2d 0x0013 0x0000.017edc83 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x11 9 0x00 0x0b2d 0x0010 0x0000.017ed890 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x12 9 0x00 0x0b2d 0x000d 0x0000.017ee469 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x13 9 0x00 0x0b2d 0x0012 0x0000.017ee076 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x14 9 0x00 0x0b2d 0x0017 0x0000.017eec4e 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x15 9 0x00 0x0b2c 0x0016 0x0000.017e763f 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x16 9 0x00 0x0b2c 0x002a 0x0000.017e7a31 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x17 9 0x00 0x0b2d 0x001a 0x0000.017ef041 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x18 9 0x00 0x0b2d 0x001c 0x0000.017f07f1 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x19 9 0x00 0x0b2d 0x001e 0x0000.017ef826 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x1a 9 0x00 0x0b2d 0x0019 0x0000.017ef433 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x1b 9 0x00 0x0b2d 0x0021 0x0000.017f13c9 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x1c 9 0x00 0x0b2d 0x0020 0x0000.017f0be4 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x1d 9 0x00 0x0b2c 0x0003 0x0000.017e95d5 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x1e 9 0x00 0x0b2d 0x000e 0x0000.017efc19 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x1f 9 0x00 0x0b2d 0x0018 0x0000.017f03fe 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x20 9 0x00 0x0b2d 0x001b 0x0000.017f0fd7 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x21 9 0x00 0x0b2d 0x0022 0x0000.017f17bc 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x22 9 0x00 0x0b2d 0x0007 0x0000.017f1baf 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000|<---状态9为非活动事务. 0x23 10 0x80 0x0b2d 0x0000 0x0000.017f73e0 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 ||<---状态10位活动事务. |<---dba,包含这个活动事务的block地址 |<---index就是事务表中的slot号 |dba=0x0080006d我们对之进行转换,算法参考这里. | v$transaction.xidslot=35转换为16进制,正是23 |0x0080006d = 0000 0000 1000 0000 0000 0000 0110 1101 |dba 0x0080006d位于file 2,block 109上 0x24 9 0x00 0x0b2d 0xffff 0x0000.017f2519 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x25 9 0x00 0x0b2c 0x0015 0x0000.017e724c 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x26 9 0x00 0x0b2b 0x002c 0x0000.017e860a 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x27 9 0x00 0x0b2c 0x002b 0x0000.017ead85 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x28 9 0x00 0x0b2c 0x002e 0x0000.017e8def 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x29 9 0x00 0x0b2c 0x000c 0x0000.017ed0ab 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000 0x2a 9 0x00 0x0b2c 0x002f 0x0000.017e7e24 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x2b 9 0x00 0x0b2c 0x002d 0x0000.017eb178 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x2c 9 0x00 0x0b2c 0x0028 0x0000.017e89fc 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x2d 9 0x00 0x0b2c 0x0006 0x0000.017eb56b 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x2e 9 0x00 0x0b2c 0x001d 0x0000.017e91e2 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000 0x2f 9 0x00 0x0b2c 0x0026 0x0000.017e8217 0x0080006c 0x0000.000.00000000 0x00000001 0x00000000alter system dump datafile 2 block 109;********************************************************************************start dump data blocks tsn: 1 file#: 2 minblk 109 maxblk 109buffer tsn: 1 rdba: 0x0080006d (2/109)scn: 0x0000.017f73e0 seq: 0x01 flg: 0x04 tail: 0x73e00201frmt: 0x02 chkval: 0x8fbe type: 0x02=ktu undo block********************************************************************************undo blk: xid: 0x0007.023.00000b2d seq: 0x40d cnt: 0x1c irb: 0x1c icl: 0x0 flg: 0x0000 | | |<---xid = undo segment no.slotno.sequence no | |<---index.rollback.begin |这是回滚开始的地方,我们向下找到这个记录 rec offset rec offset rec offset rec offset rec offset---------------------------------------------------------------------------0x01 0x1f18 0x02 0x1e48 0x03 0x1d78 0x04 0x1ca8 0x05 0x1bd8 0x06 0x1b08 0x07 0x1a38 0x08 0x1968 0x09 0x1898 0x0a 0x17c8 0x0b 0x16f8 0x0c 0x1628 0x0d 0x1558 0x0e 0x1488 0x0f 0x13b8 0x10 0x12e8 0x11 0x1218 0x12 0x1148 0x13 0x1078 0x14 0x0fa8 0x15 0x0ed8 0x16 0x0e08 0x17 0x0d38 0x18 0x0c68 0x19 0x0b98 0x1a 0x0ac8 0x1b 0x09dc 0x1c 0x0960 *-----------------------------* rec #0x1 slt: 0x0b objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006c.040d.26 ctl max scn: 0x0000.017e096c prv tx scn: 0x0000.017e0d5ekdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.01f.00000b4b uba: 0x0080005d.04fa.01 flg: c--- lkc: 0 scn: 0x0000.017ec07bkdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 15(0xf) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0b 2d 5bcol 1: [ 7] 78 68 09 0d 0c 2a 20col 2: [ 1] 80col 3: [ 5] c4 19 5b 63 64 *-----------------------------* rec #0x2 slt: 0x0a objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.01 ctl max scn: 0x0000.017e0d5e prv tx scn: 0x0000.017e0dd1kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.018.00000b4b uba: 0x0080005d.04fa.02 flg: c--- lkc: 0 scn: 0x0000.017ec46ekdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 25(0x19) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0b 4c 3dcol 1: [ 7] 78 68 09 0d 0d 21 2ccol 2: [ 1] 80col 3: [ 5] c4 19 5c 0a 0a *-----------------------------* rec #0x3 slt: 0x09 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.02 ctl max scn: 0x0000.017e0dd1 prv tx scn: 0x0000.017e109bkdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.009.00000b4b uba: 0x0080005d.04fa.03 flg: c--- lkc: 0 scn: 0x0000.017ec860kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 35(0x23) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0c 07 22col 1: [ 7] 78 68 09 0d 0e 18 38col 2: [ 1] 80col 3: [ 5] c4 19 5c 14 15 *-----------------------------* rec #0x4 slt: 0x08 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.03 ctl max scn: 0x0000.017e109b prv tx scn: 0x0000.017e148ekdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.011.00000b4b uba: 0x0080005d.04fa.04 flg: c--- lkc: 0 scn: 0x0000.017ecc53kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 45(0x2d) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0c 26 07col 1: [ 7] 78 68 09 0d 0f 10 08col 2: [ 1] 80col 3: [ 5] c4 19 5c 1e 20 *-----------------------------* rec #0x5 slt: 0x29 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.04 ctl max scn: 0x0000.017e148e prv tx scn: 0x0000.017e1880kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.01a.00000b4b uba: 0x0080005d.04fa.05 flg: c--- lkc: 0 scn: 0x0000.017ed046kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 55(0x37) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0c 44 50col 1: [ 7] 78 68 09 0d 10 07 14col 2: [ 1] 80col 3: [ 5] c4 19 5c 28 2b *-----------------------------* rec #0x6 slt: 0x0c objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.05 ctl max scn: 0x0000.017e1880 prv tx scn: 0x0000.017e1c73kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.029.00000b4b uba: 0x0080005d.04fa.06 flg: c--- lkc: 0 scn: 0x0000.017ed439kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 65(0x41) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0c 63 32col 1: [ 7] 78 68 09 0d 10 3a 21col 2: [ 1] 80col 3: [ 5] c4 19 5c 32 36 *-----------------------------* rec #0x7 slt: 0x11 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.06 ctl max scn: 0x0000.017e1c73 prv tx scn: 0x0000.017e2066kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.027.00000b4b uba: 0x0080005d.04fa.07 flg: c--- lkc: 0 scn: 0x0000.017ed82bkdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 75(0x4b) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0d 1e 17col 1: [ 7] 78 68 09 0d 11 31 2dcol 2: [ 1] 80col 3: [ 5] c4 19 5c 3c 41 *-----------------------------* rec #0x8 slt: 0x10 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.07 ctl max scn: 0x0000.017e2066 prv tx scn: 0x0000.017e2459kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.01d.00000b4b uba: 0x0080005d.04fa.08 flg: c--- lkc: 0 scn: 0x0000.017edc1ekdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 85(0x55) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0d 3c 60col 1: [ 7] 78 68 09 0d 12 28 39col 2: [ 1] 80col 3: [ 5] c4 19 5c 46 4c *-----------------------------* rec #0x9 slt: 0x13 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.08 ctl max scn: 0x0000.017e2459 prv tx scn: 0x0000.017e284bkdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.01c.00000b4b uba: 0x0080005d.04fa.09 flg: c--- lkc: 0 scn: 0x0000.017ee011kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 95(0x5f) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0d 5b 45col 1: [ 7] 78 68 09 0d 13 20 09col 2: [ 1] 80col 3: [ 5] c4 19 5c 50 57 *-----------------------------* rec #0xa slt: 0x12 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.09 ctl max scn: 0x0000.017e284b prv tx scn: 0x0000.017e2c3ekdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.02c.00000b4b uba: 0x0080005d.04fa.0a flg: c--- lkc: 0 scn: 0x0000.017ee403kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 105(0x69) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0e 16 27col 1: [ 7] 78 68 09 0d 14 17 15col 2: [ 1] 80col 3: [ 5] c4 19 5c 5a 61 *-----------------------------* rec #0xb slt: 0x0d objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.0a ctl max scn: 0x0000.017e2c3e prv tx scn: 0x0000.017e3031kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.022.00000b4b uba: 0x0080005d.04fa.0b flg: c--- lkc: 0 scn: 0x0000.017ee7f6kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 115(0x73) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0e 35 0ccol 1: [ 7] 78 68 09 0d 15 0e 22col 2: [ 1] 80col 3: [ 5] c4 19 5d 01 08 *-----------------------------* rec #0xc slt: 0x14 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.0b ctl max scn: 0x0000.017e3031 prv tx scn: 0x0000.017e3424kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.02a.00000b4b uba: 0x0080005d.04fa.0c flg: c--- lkc: 0 scn: 0x0000.017eebe9kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 125(0x7d) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0e 53 55col 1: [ 7] 78 68 09 0d 16 05 2ecol 2: [ 1] 80col 3: [ 5] c4 19 5d 0b 13 *-----------------------------* rec #0xd slt: 0x17 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.0c ctl max scn: 0x0000.017e3424 prv tx scn: 0x0000.017e3816kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.02e.00000b4b uba: 0x0080005d.04fa.0d flg: c--- lkc: 0 scn: 0x0000.017eefdckdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 135(0x87) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0f 0e 37col 1: [ 7] 78 68 09 0d 16 38 3acol 2: [ 1] 80col 3: [ 5] c4 19 5d 15 1d *-----------------------------* rec #0xe slt: 0x1a objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.0d ctl max scn: 0x0000.017e3816 prv tx scn: 0x0000.017e3c09kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.028.00000b4b uba: 0x0080005d.04fa.0e flg: c--- lkc: 0 scn: 0x0000.017ef3cekdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 145(0x91) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 0f 2d 1ccol 1: [ 7] 78 68 09 0d 17 30 0acol 2: [ 1] 80col 3: [ 5] c4 19 5d 1f 28 *-----------------------------* rec #0xf slt: 0x19 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.0e ctl max scn: 0x0000.017e3c09 prv tx scn: 0x0000.017e3ffckdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.02f.00000b4b uba: 0x0080005d.04fa.0f flg: c--- lkc: 0 scn: 0x0000.017ef7c1kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 155(0x9b) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: -1col 0: [ 5] c5 0b 60 0f 4ccol 1: [ 7] 78 68 09 0d 18 27 16col 2: [ 1] 80col 3: [ 5] c4 19 5d 29 33 *-----------------------------* rec #0x10 slt: 0x1e objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.0f ctl max scn: 0x0000.017e3ffc prv tx scn: 0x0000.017e43f4kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.02b.00000b4b uba: 0x0080005d.04fa.10 flg: c--- lkc: 0 scn: 0x0000.017efbb4kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 165(0xa5) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 1col 0: [ 6] c5 0b 60 10 06 4acol 1: [ 7] 78 68 09 0e 01 1e 23col 2: [ 1] 80col 3: [ 5] c4 19 5d 33 3e *-----------------------------* rec #0x11 slt: 0x0e objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.10 ctl max scn: 0x0000.017e43f4 prv tx scn: 0x0000.017e4599kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.003.00000b4c uba: 0x0080005d.04fa.11 flg: c--- lkc: 0 scn: 0x0000.017effa7kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 175(0xaf) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 10 25 2ccol 1: [ 7] 78 68 09 0e 02 15 2fcol 2: [ 1] 80col 3: [ 5] c4 19 5d 3d 48 *-----------------------------* rec #0x12 slt: 0x1f objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.11 ctl max scn: 0x0000.017e4599 prv tx scn: 0x0000.017e46d6kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.021.00000b4b uba: 0x0080005d.04fa.12 flg: c--- lkc: 0 scn: 0x0000.017f0399kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 185(0xb9) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 10 44 11col 1: [ 7] 78 68 09 0e 03 0c 3bcol 2: [ 1] 80col 3: [ 5] c4 19 5d 47 53 *-----------------------------* rec #0x13 slt: 0x18 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.12 ctl max scn: 0x0000.017e46d6 prv tx scn: 0x0000.017e4ad0kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.000.00000b4c uba: 0x0080005d.04fa.13 flg: c--- lkc: 0 scn: 0x0000.017f078ckdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 195(0xc3) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 10 62 5acol 1: [ 7] 78 68 09 0e 04 04 0bcol 2: [ 1] 80col 3: [ 5] c4 19 5d 51 5e *-----------------------------* rec #0x14 slt: 0x1c objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.13 ctl max scn: 0x0000.017e4ad0 prv tx scn: 0x0000.017e4ec3kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.026.00000b4b uba: 0x0080005d.04fa.14 flg: c--- lkc: 0 scn: 0x0000.017f0b7fkdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 205(0xcd) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 11 1d 3fcol 1: [ 7] 78 68 09 0e 04 37 17col 2: [ 1] 80col 3: [ 5] c4 19 5d 5c 06 *-----------------------------* rec #0x15 slt: 0x20 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.14 ctl max scn: 0x0000.017e4ec3 prv tx scn: 0x0000.017e52b6kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.002.00000b4c uba: 0x0080005d.04fa.15 flg: c--- lkc: 0 scn: 0x0000.017f0f72kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 215(0xd7) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 11 3c 21col 1: [ 7] 78 68 09 0e 05 2e 24col 2: [ 1] 80col 3: [ 5] c4 19 5e 02 10 *-----------------------------* rec #0x16 slt: 0x1b objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.15 ctl max scn: 0x0000.017e52b6 prv tx scn: 0x0000.017e56a9kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.00a.00000b4b uba: 0x0080005d.04fa.16 flg: c--- lkc: 0 scn: 0x0000.017f1364kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 225(0xe1) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 11 5b 06col 1: [ 7] 78 68 09 0e 06 25 30col 2: [ 1] 80col 3: [ 5] c4 19 5e 0c 1b *-----------------------------* rec #0x17 slt: 0x21 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.16 ctl max scn: 0x0000.017e56a9 prv tx scn: 0x0000.017e5a9bkdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.006.00000b4c uba: 0x0080005d.04fa.17 flg: c--- lkc: 0 scn: 0x0000.017f1757kdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 235(0xeb) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 12 15 4fcol 1: [ 7] 78 68 09 0e 07 1c 3ccol 2: [ 1] 80col 3: [ 5] c4 19 5e 16 26 *-----------------------------* rec #0x18 slt: 0x22 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.17 ctl max scn: 0x0000.017e5a9b prv tx scn: 0x0000.017e5e8dkdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.012.00000b4b uba: 0x0080005d.04fa.18 flg: c--- lkc: 0 scn: 0x0000.017f1b4akdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 245(0xf5) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 12 34 31col 1: [ 7] 78 68 09 0e 08 14 0ccol 2: [ 1] 80col 3: [ 5] c4 19 5e 20 30 *-----------------------------* rec #0x19 slt: 0x07 objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.18 ctl max scn: 0x0000.017e5e8d prv tx scn: 0x0000.017e6281kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.005.00000b4c uba: 0x0080005d.04fa.19 flg: c--- lkc: 0 scn: 0x0000.017f1f3dkdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8d hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 255(0xff) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 12 53 16col 1: [ 7] 78 68 09 0e 09 0b 18col 2: [ 1] 80col 3: [ 5] c4 19 5e 2a 3b *-----------------------------* rec #0x1a slt: 0x0f objn: 516(0x00000204) objd: 514 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.19 ctl max scn: 0x0000.017e6281 prv tx scn: 0x0000.017e6673kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0006.008.00000b4c uba: 0x0080005d.04fa.1a flg: c--- lkc: 0 scn: 0x0000.017f232fkdo op code: urp row dependencies disabled xtype: xa bdba: 0x00400e8e hdba: 0x00400e89itli: 2 ispac: 0 maxfr: 4863tabn: 1 slot: 7(0x7) flag: 0x6c lock: 0 ckix: 0ncol: 4 nnew: 4 size: 0col 0: [ 6] c5 0b 60 13 0d 5fcol 1: [ 7] 78 68 09 0e 0a 02 24col 2: [ 1] 80col 3: [ 5] c4 19 5e 34 46 *-----------------------------* rec #0x1b slt: 0x24 objn: 18(0x00000012) objd: 18 tblspc: 0(0x00000000)* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.1a ctl max scn: 0x0000.017e6673 prv tx scn: 0x0000.017e6a66kdo undo record:ktb redo op: 0x04 ver: 0x01 op: l itl: xid: 0x0007.01e.00000b14 uba: 0x008000dd.03f2.1b flg: c--- lkc: 0 scn: 0x0000.017cfed9kdo op code: urp row dependencies disabled xtype: xa bdba: 0x0040007a hdba: 0x00400079itli: 1 ispac: 0 maxfr: 4863tabn: 0 slot: 33(0x21) flag: 0x2c lock: 0 ckix: 0ncol: 17 nnew: 11 size: 0col 0: [ 2] c1 02col 1: [ 4] c3 02 3e 4ecol 6: [ 1] 80col 7: [ 7] 78 67 07 10 04 29 0ecol 8: [ 7] 78 68 09 0f 0e 39 1acol 9: [ 7] 78 67 07 10 04 29 0ecol 10: [ 1] 80col 13: [ 1] 80col 14: *null*col 15: [ 1] 80col 16: [ 4] c3 07 38 24 *-----------------------------* rec #0x1c slt: 0x23 objn: 16177(0x00003f31) objd: 16177 tblspc: 0(0x00000000)sql> select object_name from dba_objects where object_id=16177;object_name--------------------------------------------------------------------------------ud* layer: 11 (row) opc: 1 rci 0x00 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no rdba: 0x00000000*-----------------------------uba: 0x0080006d.040d.1b ctl max scn: 0x0000.017e6a66 prv tx scn: 0x0000.017e6e59kdo undo record:ktb redo op: 0x03 ver: 0x01 op: zkdo op code: urp row dependencies disabled xtype: xa bdba: 0x0040657a hdba: 0x00406579itli: 2 ispac: 0 maxfr: 4863tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 80ncol: 1 nnew: 1 size: 0col 0: [ 2] c1 03 <------这里记录的就是前镜像 c1 03就是2 end dump data blocks tsn: 1 file#: 2 minblk 109 maxblk 109
我们再来看一下数据块的变化:
sql> select file_id,block_id from dba_extents where segment_name='ud'; file_id block_id---------- ---------- 1 25977sql> alter system dump datafile 1 block min 25977 block max 25979;system altered.查看trace内容:start dump data blocks tsn: 0 file#: 1 minblk 25977 maxblk 25979buffer tsn: 0 rdba: 0x00406579 (1/25977)scn: 0x0000.017f2520 seq: 0x01 flg: 0x04 tail: 0x25201001frmt: 0x02 chkval: 0x1d41 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:: 0x0040657b 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#: 16177 flag: 0x40000000 extent map ----------------------------------------------------------------- 0x0040657a length: 7 nfl = 1, nfb = 1 typ = 1 nxf = 0 ccnt = 1 seg lst:: flg: used lhd: 0x0040657a ltl: 0x0040657a buffer tsn: 0 rdba: 0x0040657a (1/25978)scn: 0x0000.017f73e0 seq: 0x01 flg: 0x04 tail: 0x73e00601frmt: 0x02 chkval: 0x6763 type: 0x06=trans datablock header dump: 0x0040657a object id on block? y seg/obj: 0x3f31 csc: 0x00.17f73dc itc: 2 flg: o typ: 1 - data fsl: 0 fnx: 0x0 ver: 0x01 itl xid uba flag lck scn/fsc0x01 0x0005.018.00000b53 0x0080004d.04f6.1d c--- 0 scn 0x0000.017f25210x02 0x0007.023.00000b2d 0x0080006d.040d.1c ---- 1 fsc 0x0000.00000000itl事务槽--interested transaction list(itl)itl内容包括:xid---transaction iduba---undo block addresslck---lock statusxid=undo.segment.number+transaction.table.slot.number+wrap我们看到itl2上存在活动事务.xid=0x0007.023.00000b2d指向7号回滚段.slot号为23,wrap#为b2d,正是我们dump回滚段看到的那个事务.uba=address.of.last.undo.block.used+sequence+last.entry.in.undo.record.mapuba=0x0080006d.040d.1c data_block_dump,data header at 0xadb505c===============tsiz: 0x1fa0hsiz: 0x16pbl: 0x0adb505cbdba: 0x0040657a 76543210flag=--------ntab=1nrow=2frre=-1fsbo=0x16fseo=0x1f94avsp=0x1f78tosp=0x1f780xe:pti[0] nrow=2 offs=00x12:pri[0] offs=0x1f9a0x14:pri[1] offs=0x1f94block_row_dump:tab 0, row 0, @0x1f9atl: 6 fb: --h-fl-- lb: 0x0 cc: 1col 0: [ 2] c1 02tab 0, row 1, @0x1f94tl: 6 fb: --h-fl-- lb: 0x2 cc: 1col 0: [ 2] c2 0bend_of_block_dumpbuffer tsn: 0 rdba: 0x0000657b (0/25979)scn: 0x0000.00000000 seq: 0x01 flg: 0x05 tail: 0x00000001frmt: 0x02 chkval: 0x627b type: 0x00=unknownhex dump of corrupt header 4 = corruptdump of memory from 0x0adb5000 to 0x0adb5014adb5000 00000200 0000657b 00000000 05010000 [....{e..........]adb5010 0000627b [{b..] end dump data blocks tsn: 0 file#: 1 minblk 25977 maxblk 25979
现在我们来总结一下事务的流程:
1.分配一个回滚段
2.在回滚段事务表中分配一个事务槽
3.分配undo block
4.更新数据块上的itl事务槽
5.把前镜像记录在undo block内
6.更改数据块的内容
由于delayed block cleanout的存在,oracle在读一个block时,如果itl事务槽存在活动事务,那么oracle必须根据相应的xid找到
相应的回滚段以判断事务状态.