SQL> update t set owner='killdb.com' where object_id=555;
已更新 1 行。
SQL> select xidusn,xidslot,xidsqn,ubablk,ubafil,ubarec,START_SCN from v$transaction;
XIDUSN XIDSLOT XIDSQN UBABLK UBAFIL UBAREC START_SCN
---------- ---------- ---------- ---------- ---------- ---------- ----------
6 15 916 366 3 6 968248
SQL> select dbms_rowid.rowid_block_number(rowid) blk# from t where object_id=555;
BLK#
----------
491
SQL> select distinct dbms_rowid.rowid_relative_fno(rowid) file# from t;
FILE#
----------
5
alter system dump datafile 5 block 491;
Block header dump: 0x014001eb
Object id on Block? Y
seg/obj: 0x15a1d csc: 0x00.ef4ce itc: 3 flg: E typ: 1 - DATA
brn: 0 bdba: 0x14001e8 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0xffff.000.00000000 0x00000000.0000.00 C--- 0 scn 0x0000.000ec619
0x02 0x0006.00f.00000394 0x00c0016e.0085.06 ---- 1 fsc 0x0000.00000000
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
bdba: 0x014001eb
data_block_dump,data header at 0xfffffd7ffdd34a7c
===============
tsiz: 0x1f80
hsiz: 0x474
pbl: 0xfffffd7ffdd34a7c
76543210
flag=--------
ntab=1
nrow=561
frre=-1
fsbo=0x474
fseo=0x799
avsp=0x330
tosp=0x330
0xe:pti[0] nrow=561 offs=0
0x12:pri[0] offs=0x1f76
0x14:pri[1] offs=0x1f6c
0x16:pri[2] offs=0x1f62
0x18:pri[3] offs=0x1f58
0x1a:pri[4] offs=0x1f4e
0x1c:pri[5] offs=0x1f44
0x1e:pri[6] offs=0x1f3a
0x20:pri[7] offs=0x1f30
0x22:pri[8] offs=0x1f26
0x24:pri[9] offs=0x1f1c
0x26:pri[10] offs=0x1f12
0x28:pri[11] offs=0x1f08
0x02 0x0006.00f.00000394 0x00c0016e.0085.06 ---- 1 fsc 0x0000.00000000
SQL> select dbms_utility.data_block_address_file(to_number(substr(uba, 3, 8),
'xxxxxxxxxxxx')) as undo_file#,
dbms_utility.data_block_address_block(to_number(substr(uba, 3, 8),
'xxxxxxxxxxxx')) as undo_block,
to_number(substr(uba, 12, 4), 'xxxxxxxxxxxx') undo_sequence,
to_number(substr(uba, 17, 2), 'xxxxxxxxxxxx') undo_record
from (select '0x00c0016e.0085.06' uba from dual); 2 3 4 5 6 7
UNDO_FILE# UNDO_BLOCK UNDO_SEQUENCE UNDO_RECORD
---------- ---------- ------------- -----------
3 366 133 6
uba = Address of the last undo block used + Sequence + Last Entry in UNDO record map
dump undo header:
SQL> select name from v$rollname where usn=6;
NAME
------------------------------
_SYSSMU6_112126372$
alter system dump undo header '_SYSSMU6_112126372$';
********************************************************************************
Undo Segment: _SYSSMU6_112126372$ (6)
********************************************************************************
Extent Control Header
-----------------------------------------------------------------
Extent Header:: spare1: 0 spare2: 0 #extents: 4 #blocks: 151
last map 0x00000000 #maps: 0 offset: 4080
Highwater:: 0x00c0016f ext#: 2 blk#: 7 ext size: 8
#blocks in seg. hdr's freelists: 0
#blocks below: 0
mapblk 0x00000000 offset: 2
Unlocked
Map Header:: next 0x00000000 #extents: 4 obj#: 0 flag: 0x40000000
Extent Map
-----------------------------------------------------------------
0x00c000d1 length: 7
0x00c000d8 length: 8
0x00c00168 length: 8
0x00c00900 length: 128
Retention Table
-----------------------------------------------------------
Extent Number:0 Commit Time: 1408809628
Extent Number:1 Commit Time: 1408809628
Extent Number:2 Commit Time: 1408846934
Extent Number:3 Commit Time: 1408809628
TRN CTL:: seq: 0x0085 chd: 0x000b ctl: 0x0012 inc: 0x00000000 nfb: 0x0001
mgc: 0xb000 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x00c0016f.0085.01 scn: 0x0000.000ebd47
Version: 0x01
FREE BLOCK POOL::
uba: 0x00c0016f.0085.01 ext: 0x2 spc: 0x1f84
uba: 0x00000000.0085.02 ext: 0x2 spc: 0x1ee2
uba: 0x00000000.0085.1f ext: 0x2 spc: 0x978
uba: 0x00000000.0000.00 ext: 0x0 spc: 0x0
uba: 0x00000000.0000.00 ext: 0x0 spc: 0x0
TRN TBL::
index state cflags wrap# uel scn dba parent-xid nub stmt_num cmt
------------------------------------------------------------------------------------------------
0x0a 9 0x00 0x0394 0x0012 0x0000.000ec5eb 0x00c0016d 0x0000.000.00000000 0x00000001 0x00000000 1408814848
0x0b 9 0x00 0x0393 0x0015 0x0000.000ebd59 0x00c0016c 0x0000.000.00000000 0x00000001 0x00000000 1408810230
0x0c 9 0x00 0x0394 0x0006 0x0000.000ec5e8 0x00c0016e 0x0000.000.00000000 0x00000001 0x00000000 1408814848
0x0d 9 0x00 0x0393 0x0019 0x0000.000ec24e 0x00c0016c 0x0000.000.00000000 0x00000001 0x00000000 1408813250
0x0e 9 0x00 0x0394 0x000c 0x0000.000ec5ae 0x00c0016d 0x0000.000.00000000 0x00000001 0x00000000 1408814750
0x0f 10 0x80 0x0394 0x0002 0x0000.000ec638 0x00c0016e 0x0000.000.00000000 0x00000001 0x00000000 0
usn: 6
sp1:0x00000000 sp2:0x00000000 sp3:0x00000000 sp4:0x00000000
sp5:0x00000000 sp6:0x00000000 sp7:0x00000000 sp8:0x00000000
EXT TRN TBL::
这里的dba=0x00c0016e和uba=0x00c0016e.0085.06 一致。