***alter system dump datafile
select * from v$session where username='SCOTT';
select scott.tt1.*,dbms_rowid.rowid_relative_fno(rowid) fno,dbms_rowid.rowid_block_number(rowid) block,dbms_rowid.rowid_row_number(rowid) rowno from scott.tt1;
SQL> alter system dump datafile 4 block 524;
系统已更改。
dump 内容如下(截取了一部分):
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0005.017.0000018a 0x00800d97.0169.3b ---- 1 fsc 0x0000.00000000
0x02 0x0007.00f.000001a3 0x00800b72.019a.09 ---- 1 fsc 0x0000.00000000
0x03 0x0008.02a.00000185 0x0081083e.014d.20 ---- 1 fsc 0x0000.00000000
0x04 0x0003.01c.00000187 0x0088e6dc.0c02.06 ---- 1 fsc 0x0000.00000000
SQL> select addr,xidusn,xidslot,xidsqn,ubafil,ubablk,ubasqn,ubarec from v$transaction;
ADDR XIDUSN XIDSLOT XIDSQN UBAFIL UBABLK UBASQN UBAREC
-------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
333A2670 7 15 419 2 2930 410 9
333B3B1C 8 42 389 2 67646 333 32
333B4040 5 23 394 2 3479 361 59
333B8EB4 3 28 391 2 583388 3074 6
SQL> select to_number('0005','xxxxx') xidusn,to_number('017','xxxxx') xidslot,to_number('0000018a','xxxxxxxx') xidsqn from dual;
XIDUSN XIDSLOT XIDSQN
---------- ---------- ----------
5 23 394
select dbms_utility.data_block_address_file(to_number('00800d97','xxxxxxxx')) ubafil,dbms_utility.data_block_address_block(to_number('00800d97','xxxxxxxx')) ubablk,
to_number('0169','xxxxx') ubasqn,to_number('3b','xxxxx') ubarec from dual;
UBAFIL UBABLK UBASQN UBAREC
---------- ---------- ---------- ----------
2 3479 361 59
####################################################################################################
***alter system dump undo header
下面是undo部分.
v$transaction.xidusn= undo segment name;
SQL> select * from v$rollname where usn=5;
USN NAME
---------- ------------------------------------------------------------
5 _SYSSMU5$
SQL> alter system dump undo header '_SYSSMU5$';
系统已更改。
内容(只截取部分):
TRN CTL:: seq: 0x0169 chd: 0x0013 ctl: 0x0018 inc: 0x00000000 nfb: 0x0000
mgc: 0x8201 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe)
uba: 0x00800d97.0169.3b scn: 0x0000.002a030c
0x17 10 0x80 0x018a 0x0003 0x0000.002b06f3 0x00800d97 0x0000.000.00000000 0x00000001 0x00000000 0
####################################################################################################
***alter system dump undo datafile
SQL> alter system dump datafile 2 block 2479;
系统已更改。
注意其中的0x17.
UNDO BLK:
xid: 0x0005.022.0000017a seq: 0x164 cnt: 0x3a irb: 0x3a icl: 0x0 flg: 0x0000
Rec Offset Rec Offset Rec Offset Rec Offset Rec Offset
---------------------------------------------------------------------------
0x01 0x1f3c 0x02 0x1ed8 0x03 0x1e2c 0x04 0x1dc8 0x05 0x1d14
0x06 0x1ca0 0x07 0x1bf4 0x08 0x1b80 0x09 0x1acc 0x0a 0x1a68
0x0b 0x19bc 0x0c 0x1958 0x0d 0x18ac 0x0e 0x1848 0x0f 0x179c
0x10 0x1738 0x11 0x168c 0x12 0x1628 0x13 0x1578 0x14 0x1514
0x15 0x1468 0x16 0x1404 0x17 0x1354 0x18 0x12f0 0x19 0x1240
0x1a 0x11dc 0x1b 0x112c 0x1c 0x10c8 0x1d 0x1018 0x1e 0x0fb4
0x1f 0x0f08 0x20 0x0ea4 0x21 0x0df4 0x22 0x0d90 0x23 0x0ce0
0x24 0x0c7c 0x25 0x0bcc 0x26 0x0b68 0x27 0x0ab8 0x28 0x0a54
0x29 0x09a4 0x2a 0x0940 0x2b 0x0890 0x2c 0x082c 0x2d 0x077c
0x2e 0x0718 0x2f 0x0668 0x30 0x0604 0x31 0x0558 0x32 0x04f4
0x33 0x0448 0x34 0x03e4 0x35 0x0338 0x36 0x02d4 0x37 0x0228
0x38 0x01c4 0x39 0x0114 0x3a 0x00b0
*-----------------------------
* Rec #0x17 slt: 0x22 objn: 8942(0x000022ee) objd: 8942 tblspc: 2(0x00000002)
* Layer: 11 (Row) opc: 1 rci 0x16
Undo type: Regular undo Last buffer split: No
Temp Object: No
Tablespace Undo: No
rdba: 0x00000000
*-----------------------------
KDO undo record:
KTB Redo
op: 0x02 ver: 0x01
op: C uba: 0x008009af.0164.15
KDO Op code: IRP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x00c00bec hdba: 0x00c00beb
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 74(0x4a) size/delt: 52
fb: --H-FL-- lb: 0x0 cc: 12
null:
01234567890123456789012345678901234567890123456789012345678901234567890123456789
--------NNN-
col 0: [ 2] c1 36
col 1: [ 6] c5 2b 42 57 41 05
col 2: [13] 36 30 75 77 32 76 68 36 71 39 76 6e 32
col 3: [ 2] 3a 37
col 4: [ 2] c1 0a
col 5: [ 2] c1 09
col 6: [ 2] c1 03
col 7: [ 6] 4e 55 4d 42 45 52
col 8: *NULL*
col 9: *NULL*
col 10: *NULL*
col 11: [ 2] c1 17
*-----------------------------
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24237320/viewspace-1801884/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24237320/viewspace-1801884/