热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

oracle和orecol,UndoInternal的研究

以下开始测试:SQLcreatetableud(nnumber);Tablecreated.SQLinsertintoudvalues(1);1rowcreated.SQLi

以下开始测试:

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 bytes

Fixed Size 451176 bytes

Variable Size 29360128 bytes

Database Buffers 16777216 bytes

Redo Buffers 667648 bytes

Database 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 0

11 rows selected.

SQL> select * from ud;

N

----------

1

2

SQL> 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 28

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 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 0

11 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> @gettrcname

TRACE_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.017e6e59

Version: 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

|

0x23 10 0x80 0x0b2d 0x0000 0x0000.017f73e0 0x0080006d 0x0000.000.00000000 0x00000001 0x00000000

| |

|

| 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 0x00000000

alter system dump datafile 2 block 109;

********************************************************************************

Start dump data blocks tsn: 1 file#: 2 minblk 109 maxblk 109

buffer tsn: 1 rdba: 0x0080006d (2/109)

scn: 0x0000.017f73e0 seq: 0x01 flg: 0x04 tail: 0x73e00201

frmt: 0x02 chkval: 0x8fbe type: 0x02=KTU UNDO BLOCK

********************************************************************************

UNDO BLK:

xid: 0x0007.023.00000b2d seq: 0x40d cnt: 0x1c irb: 0x1c icl: 0x0 flg: 0x0000

| |

|

|

|这是回滚开始的地方,我们向下找到这个记录

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.017e0d5e

KDO 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.017ec07b

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 15(0xf) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0b 2d 5b

col 1: [ 7] 78 68 09 0d 0c 2a 20

col 2: [ 1] 80

col 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.017e0dd1

KDO 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.017ec46e

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 25(0x19) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0b 4c 3d

col 1: [ 7] 78 68 09 0d 0d 21 2c

col 2: [ 1] 80

col 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.017e109b

KDO 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.017ec860

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 35(0x23) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0c 07 22

col 1: [ 7] 78 68 09 0d 0e 18 38

col 2: [ 1] 80

col 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.017e148e

KDO 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.017ecc53

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 45(0x2d) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0c 26 07

col 1: [ 7] 78 68 09 0d 0f 10 08

col 2: [ 1] 80

col 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.017e1880

KDO 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.017ed046

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 55(0x37) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0c 44 50

col 1: [ 7] 78 68 09 0d 10 07 14

col 2: [ 1] 80

col 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.017e1c73

KDO 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.017ed439

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 65(0x41) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0c 63 32

col 1: [ 7] 78 68 09 0d 10 3a 21

col 2: [ 1] 80

col 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.017e2066

KDO 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.017ed82b

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 75(0x4b) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0d 1e 17

col 1: [ 7] 78 68 09 0d 11 31 2d

col 2: [ 1] 80

col 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.017e2459

KDO 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.017edc1e

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 85(0x55) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0d 3c 60

col 1: [ 7] 78 68 09 0d 12 28 39

col 2: [ 1] 80

col 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.017e284b

KDO 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.017ee011

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 95(0x5f) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0d 5b 45

col 1: [ 7] 78 68 09 0d 13 20 09

col 2: [ 1] 80

col 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.017e2c3e

KDO 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.017ee403

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 105(0x69) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0e 16 27

col 1: [ 7] 78 68 09 0d 14 17 15

col 2: [ 1] 80

col 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.017e3031

KDO 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.017ee7f6

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 115(0x73) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0e 35 0c

col 1: [ 7] 78 68 09 0d 15 0e 22

col 2: [ 1] 80

col 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.017e3424

KDO 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.017eebe9

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 125(0x7d) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0e 53 55

col 1: [ 7] 78 68 09 0d 16 05 2e

col 2: [ 1] 80

col 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.017e3816

KDO 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.017eefdc

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 135(0x87) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0f 0e 37

col 1: [ 7] 78 68 09 0d 16 38 3a

col 2: [ 1] 80

col 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.017e3c09

KDO 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.017ef3ce

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 145(0x91) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 0f 2d 1c

col 1: [ 7] 78 68 09 0d 17 30 0a

col 2: [ 1] 80

col 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.017e3ffc

KDO 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.017ef7c1

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 155(0x9b) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: -1

col 0: [ 5] c5 0b 60 0f 4c

col 1: [ 7] 78 68 09 0d 18 27 16

col 2: [ 1] 80

col 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.017e43f4

KDO 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.017efbb4

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 165(0xa5) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 1

col 0: [ 6] c5 0b 60 10 06 4a

col 1: [ 7] 78 68 09 0e 01 1e 23

col 2: [ 1] 80

col 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.017e4599

KDO 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.017effa7

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 175(0xaf) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 10 25 2c

col 1: [ 7] 78 68 09 0e 02 15 2f

col 2: [ 1] 80

col 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.017e46d6

KDO 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.017f0399

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 185(0xb9) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 10 44 11

col 1: [ 7] 78 68 09 0e 03 0c 3b

col 2: [ 1] 80

col 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.017e4ad0

KDO 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.017f078c

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 195(0xc3) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 10 62 5a

col 1: [ 7] 78 68 09 0e 04 04 0b

col 2: [ 1] 80

col 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.017e4ec3

KDO 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.017f0b7f

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 205(0xcd) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 11 1d 3f

col 1: [ 7] 78 68 09 0e 04 37 17

col 2: [ 1] 80

col 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.017e52b6

KDO 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.017f0f72

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 215(0xd7) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 11 3c 21

col 1: [ 7] 78 68 09 0e 05 2e 24

col 2: [ 1] 80

col 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.017e56a9

KDO 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.017f1364

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 225(0xe1) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 11 5b 06

col 1: [ 7] 78 68 09 0e 06 25 30

col 2: [ 1] 80

col 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.017e5a9b

KDO 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.017f1757

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 235(0xeb) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 12 15 4f

col 1: [ 7] 78 68 09 0e 07 1c 3c

col 2: [ 1] 80

col 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.017e5e8d

KDO 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.017f1b4a

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 245(0xf5) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 12 34 31

col 1: [ 7] 78 68 09 0e 08 14 0c

col 2: [ 1] 80

col 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.017e6281

KDO 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.017f1f3d

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8d hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 255(0xff) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 12 53 16

col 1: [ 7] 78 68 09 0e 09 0b 18

col 2: [ 1] 80

col 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.017e6673

KDO 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.017f232f

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x00400e8e hdba: 0x00400e89

itli: 2 ispac: 0 maxfr: 4863

tabn: 1 slot: 7(0x7) flag: 0x6c lock: 0 ckix: 0

ncol: 4 nnew: 4 size: 0

col 0: [ 6] c5 0b 60 13 0d 5f

col 1: [ 7] 78 68 09 0e 0a 02 24

col 2: [ 1] 80

col 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.017e6a66

KDO 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.017cfed9

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x0040007a hdba: 0x00400079

itli: 1 ispac: 0 maxfr: 4863

tabn: 0 slot: 33(0x21) flag: 0x2c lock: 0 ckix: 0

ncol: 17 nnew: 11 size: 0

col 0: [ 2] c1 02

col 1: [ 4] c3 02 3e 4e

col 6: [ 1] 80

col 7: [ 7] 78 67 07 10 04 29 0e

col 8: [ 7] 78 68 09 0f 0e 39 1a

col 9: [ 7] 78 67 07 10 04 29 0e

col 10: [ 1] 80

col 13: [ 1] 80

col 14: *NULL*

col 15: [ 1] 80

col 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.017e6e59

KDO undo record:

KTB Redo

op: 0x03 ver: 0x01

op: Z

KDO Op code: URP row dependencies Disabled

xtype: XA bdba: 0x0040657a hdba: 0x00406579

itli: 2 ispac: 0 maxfr: 4863

tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 80

ncol: 1 nnew: 1 size: 0

col 0: [ 2] c1 03

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 25977

SQL> 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 25979

buffer tsn: 0 rdba: 0x00406579 (1/25977)

scn: 0x0000.017f2520 seq: 0x01 flg: 0x04 tail: 0x25201001

frmt: 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: 0x73e00601

frmt: 0x02 chkval: 0x6763 type: 0x06=trans data

Block 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/Fsc

0x01 0x0005.018.00000b53 0x0080004d.04f6.1d C--- 0 scn 0x0000.017f2521

0x02 0x0007.023.00000b2d 0x0080006d.040d.1c ---- 1 fsc 0x0000.00000000

ITL事务槽--Interested Transaction List(ITL)

ITL内容包括:

xid---Transaction ID

Uba---Undo Block Address

Lck---Lock Status

xid=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.Map

uba=0x0080006d.040d.1c

data_block_dump,data header at 0xadb505c

===============

tsiz: 0x1fa0

hsiz: 0x16

pbl: 0x0adb505c

bdba: 0x0040657a

76543210

flag=--------

ntab=1

nrow=2

frre=-1

fsbo=0x16

fseo=0x1f94

avsp=0x1f78

tosp=0x1f78

0xe:pti[0] nrow=2 offs=0

0x12:pri[0] offs=0x1f9a

0x14:pri[1] offs=0x1f94

block_row_dump:

tab 0, row 0, @0x1f9a

tl: 6 fb: --H-FL-- lb: 0x0 cc: 1

col 0: [ 2] c1 02

tab 0, row 1, @0x1f94

tl: 6 fb: --H-FL-- lb: 0x2 cc: 1

col 0: [ 2] c2 0b

end_of_block_dump

buffer tsn: 0 rdba: 0x0000657b (0/25979)

scn: 0x0000.00000000 seq: 0x01 flg: 0x05 tail: 0x00000001

frmt: 0x02 chkval: 0x627b type: 0x00=unknown

Hex dump of corrupt header 4 = CORRUPT

Dump of memory from 0x0ADB5000 to 0x0ADB5014

ADB5000 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找到

相应的回滚段以判断事务状态.



推荐阅读
  • 上图是InnoDB存储引擎的结构。1、缓冲池InnoDB存储引擎是基于磁盘存储的,并将其中的记录按照页的方式进行管理。因此可以看作是基于磁盘的数据库系统。在数据库系统中,由于CPU速度 ... [详细]
  • 本文介绍了在处理不规则数据时如何使用Python自动提取文本中的时间日期,包括使用dateutil.parser模块统一日期字符串格式和使用datefinder模块提取日期。同时,还介绍了一段使用正则表达式的代码,可以支持中文日期和一些特殊的时间识别,例如'2012年12月12日'、'3小时前'、'在2012/12/13哈哈'等。 ... [详细]
  • 本文介绍了在PostgreSQL中批量导入数据时的优化方法。包括使用unlogged表、删除重建索引、删除重建外键、禁用触发器、使用COPY方法、批量插入等。同时还提到了一些参数优化的注意事项,如设置effective_cache_size、shared_buffer等,并强调了在导入大量数据后使用analyze命令重新收集统计信息的重要性。 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • 本文详细介绍了Spring的JdbcTemplate的使用方法,包括执行存储过程、存储函数的call()方法,执行任何SQL语句的execute()方法,单个更新和批量更新的update()和batchUpdate()方法,以及单查和列表查询的query()和queryForXXX()方法。提供了经过测试的API供使用。 ... [详细]
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • 标题: ... [详细]
  • MyBatis多表查询与动态SQL使用
    本文介绍了MyBatis多表查询与动态SQL的使用方法,包括一对一查询和一对多查询。同时还介绍了动态SQL的使用,包括if标签、trim标签、where标签、set标签和foreach标签的用法。文章还提供了相关的配置信息和示例代码。 ... [详细]
  • 本文介绍了Python爬虫技术基础篇面向对象高级编程(中)中的多重继承概念。通过继承,子类可以扩展父类的功能。文章以动物类层次的设计为例,讨论了按照不同分类方式设计类层次的复杂性和多重继承的优势。最后给出了哺乳动物和鸟类的设计示例,以及能跑、能飞、宠物类和非宠物类的增加对类数量的影响。 ... [详细]
  • 基于Socket的多个客户端之间的聊天功能实现方法
    本文介绍了基于Socket的多个客户端之间实现聊天功能的方法,包括服务器端的实现和客户端的实现。服务器端通过每个用户的输出流向特定用户发送消息,而客户端通过输入流接收消息。同时,还介绍了相关的实体类和Socket的基本概念。 ... [详细]
  • 本文介绍了在MFC下利用C++和MFC的特性动态创建窗口的方法,包括继承现有的MFC类并加以改造、插入工具栏和状态栏对象的声明等。同时还提到了窗口销毁的处理方法。本文详细介绍了实现方法并给出了相关注意事项。 ... [详细]
  • 本文讨论了在VMWARE5.1的虚拟服务器Windows Server 2008R2上安装oracle 10g客户端时出现的问题,并提供了解决方法。错误日志显示了异常访问违例,通过分析日志中的问题帧,找到了解决问题的线索。文章详细介绍了解决方法,帮助读者顺利安装oracle 10g客户端。 ... [详细]
  • 十大经典排序算法动图演示+Python实现
    本文介绍了十大经典排序算法的原理、演示和Python实现。排序算法分为内部排序和外部排序,常见的内部排序算法有插入排序、希尔排序、选择排序、冒泡排序、归并排序、快速排序、堆排序、基数排序等。文章还解释了时间复杂度和稳定性的概念,并提供了相关的名词解释。 ... [详细]
  • 本文介绍了使用C++Builder实现获取USB优盘序列号的方法,包括相关的代码和说明。通过该方法,可以获取指定盘符的USB优盘序列号,并将其存放在缓冲中。该方法可以在Windows系统中有效地获取USB优盘序列号,并且适用于C++Builder开发环境。 ... [详细]
author-avatar
順俟自嘫
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有