SELECTs.username,t.xidusn,t.ubafil,t.ubablk,t.used_ublk FROMv$session s,v$transaction t WHEREs.saddr=t.ses_addr;
1 SYS19 56 2269 2
修改的内容在两个数据块中,但回滚段只占用了一个数据块。
测试2:设置pctfree较小的情况
droptabletrollsegment;createtabletrollsegment(
FID integer,
Fname varchar2(400),
Fothers varchar2(400)
) tablespaceodsdpctfree1
insertintotrollsegmentselectrownum, rpad('name',400,rownum),rpad('other',400,rownum)fromdba_objectswhererownum<1000
commit
selectdbms_rowid.rowid_block_number(rowid),count(*) fromtrollsegment groupbydbms_rowid.rowid_block_number(rowid)selectdbms_rowid.rowid_block_number(rowid),dbms_rowid.rowid_relative_fno(rowid),fid fromtrollsegment wherefid = 10
updatetrollsegment setfname = replace(fname,'name','eman')wherefid = 10orfid = 30
SELECTs.username,t.xidusn,t.ubafil,t.ubablk,t.used_ublk FROMv$session s,v$transaction t WHEREs.saddr=t.ses_addr;
转储回滚段内容
SELECTb.name,a.xidusn, xidslot, xidsqn
FROMv$transaction a, v$rollname b
wherea.XIDUSN = b.usn;
1 _SYSSMU16$16 26 799
SQL> alter system dump undo block '_SYSSMU16$'
2 xid 16 26 799;
System altered
*** 2009-02-07 11:12:10.687
********************************************************************************
Undo Segment: _SYSSMU16$ (16)
xid: 0x0010.01a.0000031f
Low Blk : (0, 0)
High Blk : (3, 127)
Object Id : ALL
Layer : ALL
Opcode : ALL
Level : 2
********************************************************************************
UNDO BLK: Extent: 2 Block: 78 dba (file#, block#): 56,0x00000857
xid: 0x0010.01a.0000031f seq: 0x52 cnt: 0x4f irb: 0x4f icl: 0x0 flg: 0x0000
Rec Offset Rec Offset Rec Offset Rec Offset Rec Offset
---------------------------------------------------------------------------
0x01 0x1fac 0x02 0x1f54 0x03 0x1efc 0x04 0x1ec4 0x05 0x1e6c
0x06 0x1e14 0x07 0x1ddc 0x08 0x1d84 0x09 0x1d2c 0x0a 0x1cf4
0x0b 0x1c9c 0x0c 0x1c44 0x0d 0x1c0c 0x0e 0x1bb4 0x0f 0x1b5c
0x10 0x1b24 0x11 0x1acc 0x12 0x1a74 0x13 0x1a3c 0x14 0x1a04
0x15 0x19ac 0x16 0x1954 0x17 0x191c 0x18 0x18c4 0x19 0x186c
0x1a 0x1834 0x1b 0x17dc 0x1c 0x1784 0x1d 0x174c 0x1e 0x16f4
0x1f 0x169c 0x20 0x1664 0x21 0x160c 0x22 0x15b4 0x23 0x157c
0x24 0x1524 0x25 0x14cc 0x26 0x1494 0x27 0x143c 0x28 0x13e4
0x29 0x13ac 0x2a 0x1354 0x2b 0x12fc 0x2c 0x12c4 0x2d 0x126c
0x2e 0x1214 0x2f 0x11dc 0x30 0x1184 0x31 0x112c 0x32 0x10f4
0x33 0x109c 0x34 0x1044 0x35 0x100c 0x36 0x0fb4 0x37 0x0f5c
0x38 0x0f24 0x39 0x0ecc 0x3a 0x0e74 0x3b 0x0e3c 0x3c 0x0de4
0x3d 0x0d8c 0x3e 0x0d54 0x3f 0x0cfc 0x40 0x0ca4 0x41 0x0c6c
0x42 0x0c14 0x43 0x0bbc 0x44 0x0b84 0x45 0x0b2c 0x46 0x0ad4
0x47 0x0a9c 0x48 0x0a44 0x49 0x09ec 0x4a 0x09b4 0x4b 0x095c
0x4c 0x0904 0x4d 0x08cc 0x4e 0x06b4 0x4f 0x04b4
*-----------------------------
* Rec #0x4f slt: 0x1a objn: 92112(0x000167d0) objd: 92112 tblspc: 11(0x0000000b)
* Layer: 11 (Row) opc: 1 rci 0x4e
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
op: L itl: xid: 0x0013.02e.00000354 uba: 0x0e0008de.0052.31
flg: C--- lkc: 0 scn: 0x0001.85698ef5
KDO Op code: URP row dependencies Disabled
xtype: XA bdba: 0x03801d10 hdba: 0x03801d0b
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 88
ncol: 3 nnew: 1 size: 0
col 1: [400]
65 6d 61 6e 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31
30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30 31 30
*-----------------------------
* Rec #0x4e slt: 0x1a objn: 92112(0x000167d0) objd: 92112 tblspc: 11(0x0000000b)
* 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: 0x0e000857.0052.4d ctl max scn: 0x0001.85698f76 prv tx scn: 0x0001.85698f79
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
op: L itl: xid: 0x0013.02e.00000354 uba: 0x0e0008de.0052.35
flg: C--- lkc: 0 scn: 0x0001.85698ef5
KDO Op code: URP row dependencies Disabled
xtype: XA bdba: 0x03801d0d hdba: 0x03801d0b
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 88
ncol: 3 nnew: 1 size: 0
col 1: [400]
65 6d 61 6e 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33
30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30 33 30
+++++++++++ Next block not in extent map - rollback segment has been shrunk.
+ WARNING + Block dba (file#, block#): 0,0x00000000