oracle實驗記錄 (dump undo2)
SQL> conn / as sysdba
已連線。
SQL> select * from test;
TESTCOL
--------------------
a
b
SQL> select dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_blo
mber(rowid) blk# from test;
FILE# BLK#
---------- ----------
1 56802
1 56802
SQL> update test set testcol='c';
已更新2行。
SQL> alter system dump datafile 1 block 56802;
系統已更改。
SQL>
Start dump data blocks tsn: 0 file#: 1 minblk 56802 maxblk 56802
buffer tsn: 0 rdba: 0x0040dde2 (1/56802)
scn: 0x0000.00424aaf seq: 0x02 flg: 0x00 tail: 0x4aaf0602
frmt: 0x02 chkval: 0x0000 type: 0x06=trans data
Block header dump: 0x0040dde2
Object id on Block? Y
seg/obj: 0xd1fb csc: 0x00.41e426 itc: 2 flg: O typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0001.005.000007b1 0x008006c5.02d6.02 C--- 0 scn 0x0000.0041e3e6
0x02 0x0008.002.00000256 0x00800f27.0369.24 ---- 2 fsc 0x0000.00000000
data_block_dump,data header at 0x66f025c
===============
tsiz: 0x1fa0
hsiz: 0x1a
pbl: 0x066f025c
bdba: 0x0040dde2
76543210
flag=--------
ntab=1
nrow=4
frre=0
fsbo=0x1a
fseo=0x1f2a
avsp=0x1f74
tosp=0x1f74
0xe:pti[0] nrow=4 offs=0
0x12:pri[0] sfll=1
0x14:pri[1] sfll=-1
0x16:pri[2] offs=0x1f2f
0x18:pri[3] offs=0x1f2a
block_row_dump:
tab 0, row 2, @0x1f2f
tl: 5 fb: --H-FL-- lb: 0x2 cc: 1
col 0: [ 1] 63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C新值
tab 0, row 3, @0x1f2a
tl: 5 fb: --H-FL-- lb: 0x2 cc: 1
col 0: [ 1] 63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C新值
end_of_block_dump
End dump data blocks tsn: 0 file#: 1 minblk 56802 maxblk 56802
SQL> update test set testcol='cdd';
已更新2行。
SQL> update test set testcol='cddcccc';
已更新2行。
SQL> alter system dump datafile 1 block 56802;
系統已更改。
Start dump data blocks tsn: 0 file#: 1 minblk 56802 maxblk 56802
buffer tsn: 0 rdba: 0x0040dde2 (1/56802)
scn: 0x0000.00424b02 seq: 0x02 flg: 0x00 tail: 0x4b020602
frmt: 0x02 chkval: 0x0000 type: 0x06=trans data
Block header dump: 0x0040dde2
Object id on Block? Y
seg/obj: 0xd1fb csc: 0x00.41e426 itc: 2 flg: O typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0001.005.000007b1 0x008006c5.02d6.02 C--- 0 scn 0x0000.0041e3e6
0x02 0x0008.002.00000256 0x00800f27.0369.28 ---- 2 fsc 0x0000.00000000~~~~~~~~~~~~~~~~~~~~~~~~~~~~~存在另一個undo blk中
data_block_dump,data header at 0x66f025c
===============
tsiz: 0x1fa0
hsiz: 0x1a
pbl: 0x066f025c
bdba: 0x0040dde2
76543210
flag=--------
ntab=1
nrow=4
frre=0
fsbo=0x1a
fseo=0x1f06
avsp=0x1f70
tosp=0x1f70
0xe:pti[0] nrow=4 offs=0
0x12:pri[0] sfll=1
0x14:pri[1] sfll=-1
0x16:pri[2] offs=0x1f11
0x18:pri[3] offs=0x1f06
block_row_dump:
tab 0, row 2, @0x1f11
tl: 11 fb: --H-FL-- lb: 0x2 cc: 1
col 0: [ 7] 63 64 64 63 63 63 63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cddcccc~~~~~~~~~~~~~~`中間更新CDD的值得沒有了
tab 0, row 3, @0x1f06
tl: 11 fb: --H-FL-- lb: 0x2 cc: 1
col 0: [ 7] 63 64 64 63 63 63 63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~``cddcccc
end_of_block_dump
uba 0x00800f27.0369.28 查出undo blk 28條記錄 0x28
SQL> variable file# number;
SQL> variable blk# number;
SQL> execute :file#:=dbms_utility.data_block_address_file(to_number('800f27','xx
xxxxx'));
PL/SQL 過程已成功完成。
SQL> execute :blk#:=dbms_utility.data_block_address_block(to_number('800f27','xx
xxxxx'));
PL/SQL 過程已成功完成。
SQL> print blk#;
BLK#
----------
3879
SQL> print file#;
FILE#
----------
2
* Rec #0x28 slt: 0x02 objn: 53755(0x0000d1fb) objd: 53755 tblspc: 0(0x00000000)
* Layer: 11 (Row) opc: 1 rci 0x27
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: 0x00800f27.0369.27
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040dde2 hdba: 0x0040dde1
itli: 2 ispac: 0 maxfr: 4863
tabn: 0 slot: 3(0x3) flag: 0x2c lock: 2 ckix: 7
ncol: 1 nnew: 1 size: -4
col 0: [ 3] 63 64 64~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cdd
通過rci 0x27
* Rec #0x27 slt: 0x02 objn: 53755(0x0000d1fb) objd: 53755 tblspc: 0(0x00000000)
* Layer: 11 (Row) opc: 1 rci 0x26
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: 0x00800f27.0369.26
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040dde2 hdba: 0x0040dde1
itli: 2 ispac: 0 maxfr: 4863
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 7
ncol: 1 nnew: 1 size: -4
col 0: [ 3] 63 64 64~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cdd 儲存的 原來值 更新第2次的但未commit
SQL> select object_id from user_objects where object_name='TEST';
OBJECT_ID
----------
53755
在根據 rci 0x26
* Rec #0x26 slt: 0x02 objn: 53755(0x0000d1fb) objd: 53755 tblspc: 0(0x00000000)
* Layer: 11 (Row) opc: 1 rci 0x25
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: 0x00800f27.0369.25
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040dde2 hdba: 0x0040dde1
itli: 2 ispac: 0 maxfr: 4863
tabn: 0 slot: 3(0x3) flag: 0x2c lock: 2 ckix: 7
ncol: 1 nnew: 1 size: -2
col 0: [ 1] 63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
~~~~~~~~~~~~~~~~~~~~~~~在根據 rci 0x25 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Rec #0x25 slt: 0x02 objn: 53755(0x0000d1fb) objd: 53755 tblspc: 0(0x00000000)
* Layer: 11 (Row) opc: 1 rci 0x24
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: 0x00800f27.0369.24
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040dde2 hdba: 0x0040dde1
itli: 2 ispac: 0 maxfr: 4863
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 7
ncol: 1 nnew: 1 size: -2
col 0: [ 1] 63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`以上這個都是原來的值了 ~~~
* Rec #0x23 slt: 0x02 objn: 53755(0x0000d1fb) objd: 53755 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: 0x00800f27.0369.22 ctl max scn: 0x0000.004243e5 prv tx scn: 0x0000.0042440d
txn start scn: scn: 0x0000.00424aaf logon user: 0
prev brb: 8392469 prev bcl: 0
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
op: L itl: xid: 0x0008.001.00000253 uba: 0x00802c73.0368.2c
flg: C--- lkc: 0 scn: 0x0000.0041e3a2
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040dde2 hdba: 0x0040dde1
itli: 2 ispac: 0 maxfr: 4863
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 7
ncol: 1 nnew: 1 size: 0
col 0: [ 1] 61~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~a col 0 表示第一列
*-----------------------------
* Rec #0x24 slt: 0x02 objn: 53755(0x0000d1fb) objd: 53755 tblspc: 0(0x00000000)
* Layer: 11 (Row) opc: 1 rci 0x23
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: 0x00800f27.0369.23
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0040dde2 hdba: 0x0040dde1
itli: 2 ispac: 0 maxfr: 4863
tabn: 0 slot: 3(0x3) flag: 0x2c lock: 0 ckix: 7
ncol: 1 nnew: 1 size: 0
col 0: [ 1] 62~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~b commit後的 col 0 表示第一列
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12020513/viewspace-607606/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle實驗記錄 (dump undo)Oracle
- oracle實驗記錄 (dump logfile)Oracle
- oracle實驗記錄 (dump index b*tree)OracleIndex
- oracle實驗記錄 (dump undo4)Oracle
- oracle實驗記錄 (dump undo3)Oracle
- oracle實驗記錄 (flashback)Oracle
- oracle實驗記錄 (OMF)Oracle
- oracle實驗記錄 (NET)Oracle
- oracle實驗記錄 (audit)Oracle
- oracle實驗記錄 (oracle reset parameter)Oracle
- Oracle Data Redaction實驗記錄Oracle
- oracle實驗記錄 (block cleanout)OracleBloC
- oracle實驗記錄 (inlist card)Oracle
- oracle實驗記錄 (oracle 資料字典)Oracle
- Oracle檔案改名實驗記錄Oracle
- oracle實驗記錄 (選擇率)Oracle
- oracle實驗記錄 (事務控制)Oracle
- oracle實驗記錄 (函式index)Oracle函式Index
- oracle實驗記錄 (bigfile tablespace)Oracle
- oracle實驗記錄 (恢復-redo)Oracle
- oracle實驗記錄 (expdp/impdp使用)Oracle
- oracle實驗記錄 (transport tablespace(Rman))Oracle
- oracle實驗記錄 (使用exp/imp)Oracle
- oracle實驗記錄 (CKPT的觸發)Oracle
- oracle實驗記錄 手工 duplicate database(1)OracleDatabase
- oracle實驗記錄Rman duplicate database(1)OracleDatabase
- oracle實驗記錄 (許可權,role)Oracle
- oracle實驗記錄 (SQL*PLUS 命令操作)OracleSQL
- oracle實驗記錄 (PFILE 啟動SPFILE)Oracle
- oracle實驗記錄 (SHARED server MODE)OracleServer
- oracle實驗記錄Rman duplicate database 2OracleDatabase
- oracle實驗記錄(恢復-checkpoint cnt)Oracle
- oracle實驗記錄 (可恢復session)OracleSession
- oracle實驗記錄 (transport tablespace(EXPDP/IMPDP))Oracle
- oracle實驗記錄 (使用outlines)Oracle
- oracle實驗記錄 (管理outlines)Oracle
- oracle實驗記錄 (exp/imp transport tablespace)Oracle
- oracle實驗記錄 (oracle 分析shared pool(1))Oracle