您好,欢迎访问一九零五行业门户网

oracle redo log 分析

environment: os: ubuntu 10.10 oracle: 11.1.0.6.0 test table: test_user sql desc test_user; name null? type ----------------------------------------- -------- ---------------------------- id number(38) name varchar2(20) current data: sql s
environment:
os: ubuntu 10.10
oracle: 11.1.0.6.0
test table: test_user
sql> desc test_user; name null? type ----------------------------------------- -------- ---------------------------- id number(38) name varchar2(20)
current data:
sql> select * from test_user; id name---------- -------------------- 1 aaa 2 bbb 3 ccc
operation:
update test_user set name='ddd' where id=3;commit;
log file dumps:symbolic dumps can be created for both online redo logs and archived redo logs using the following syntax: alter system dump logfile '';
for online redo logs the filename of the current redo log can be obtained using the following sql: select member from v$logfile where group# = ( select group# from v$log where status = 'current' );
output dump file can be found with this command:
sql> select value from v$diag_info where name = 'default trace file';
if asm, use following command
sql> oradebug setmypid;statement processed.sql> oradebug tracefile_name;/u02/app/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_20221.trc
find the detail log info we just operated in dump file:1. find the object id of the tablesql> select object_id from user_objects where object_name='test_user'; object_id---------- 713292. find log in dump file based on object_id and operation time.the redo infomation as follows, note the obj:71329 and the timestap 12/21/2010
redo record - thread:1 rba: 0x000007.00012d3d.0010 len: 0x022c vld: 0x0dscn: 0x0000.000fddbd subscn: 1 12/21/2010 16:30:29change #1 typ:2 cls: 1 afn:4 dba:0x01000195 obj:71329 scn:0x0000.000fdd5e seq: 2 op:11.19 ktb redo op: 0x01 ver: 0x01 compat bit: 4 (post-11) padding: 1op: f xid: 0x000a.005.0000035a uba: 0x00c00478.01ca.28array update of 1 rows: tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 2 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 64 64 64 change #2 typ:0 cls:35 afn:3 dba:0x00c00099 obj:4294967295 scn:0x0000.000fdd85 seq: 1 op:5.2ktudh redo: slt: 0x0005 sqn: 0x0000035a flg: 0x0012 siz: 184 fbi: 0 uba: 0x00c00478.01ca.28 pxid: 0x0000.000.00000000change #3 typ:0 cls:35 afn:3 dba:0x00c00099 obj:4294967295 scn:0x0000.000fddbd seq: 1 op:5.4ktucm redo: slt: 0x0005 sqn: 0x0000035a srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c00478.01ca.28 ext: 2 spc: 3182 fbi: 0 change #4 typ:0 cls:36 afn:3 dba:0x00c00478 obj:4294967295 scn:0x0000.000fdd84 seq: 1 op:5.1ktudb redo: siz: 184 spc: 3368 flg: 0x0012 seq: 0x01ca rec: 0x28 xid: 0x000a.005.0000035a ktubl redo: slt: 5 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no 0x00000000 prev ctl uba: 0x00c00478.01ca.27 prev ctl max cmt scn: 0x0000.000fd7ee prev tx cmt scn: 0x0000.000fd7fa txn start scn: 0x0000.000fdd5e logon user: 106 prev brb: 12584054 prev bcl: 0 buext idx: 0 flg2: 0kdo undo record:ktb redo op: 0x04 ver: 0x01 compat bit: 4 (post-11) padding: 1op: l itl: xid: 0x0004.020.000002ef uba: 0x00c0011b.02c1.0a flg: c--- lkc: 0 scn: 0x0000.000f25f5array update of 1 rows: tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 2 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 63 63 63
redo log analysis:
redo records structure:
reo record header
redo record - thread:1 rba: 0x000007.00012d3d.0010 len: 0x022c vld: 0x0dscn: 0x0000.000fddbd subscn: 1 12/21/2010 16:30:29
thread - redo log thread number               value: 1
rba - redo byte address - address of redo record within redo log. format is ..              value: 0x00007.00012d3d.0010
                  sequence_number:  0x00007
                  block_number: 0x00012d3d
                  offset: 0x10
len - length of redo record in bytes including header              value: 0x22c             
vld -               the vld field determines the size of the redo record header. known values are shown in the following table. these values may vary from one release to another.
mnemonic value description
kcrvoid 0 the contents are not valid
kcrvalid 1 includes change vectors
kcrdepnd 2 includes commit scn
kcrvoid 4 includes dependent scn
kcrnmark 8 new scn mark record. scn allocated exactly at this point in the redo log by this instance
kcromark 16 old scn mark record. scn allocated at or before this point in the redo. may be allocated by another instance
kcrorder 32 new scn was allocated to ensure redo for some block would be ordered by inc/seq# when redo sorted by scn
value: 0x0d  -  1101: includes change vectors & includes dependent scn &  new scn mark record. scn allocated exactly at this point in the redo log by this instance
scn - system change number of redo record              value: 0x0000.000fddbd
subscn: unknown              value: 1
timestamp              value: 12/21/2010 16:30:29
change #1:
change #1 typ:2 cls: 1 afn:4 dba:0x01000195 obj:71329 scn:0x0000.000fdd5e seq: 2 op:11.19 ktb redo op: 0x01 ver: 0x01 compat bit: 4 (post-11) padding: 1op: f xid: 0x000a.005.0000035a uba: 0x00c00478.01ca.28array update of 1 rows: tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 2 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 64 64 64
change header:
change #1 typ:2 cls: 1 afn:4 dba:0x01000195 obj:71329 scn:0x0000.000fdd5e seq: 2 op:11.19
typ - change type              value: 2
cls - class 
  class description
1 data block
2 sort block
3 deferred undo segment blocks
4 segment header block (table)
5 deferred undo segment header blocks
6 free list blocks
7 extent map blocks
8 space management bitmap blocks
9 space management index blocks
10 unused
11 + 2r segment header for undo segment r
12 + 2r data blocks for undo segment r
value: 1  -  mean data block
afn - absolute file no              get file info using this sql statement:
              sql> select file_name, file_id from dba_data_files;file_name-------------------------------------------------------------------------------- file_id----------/home/duanbb/oracle/oradata/mydb/users01.dbf 4/home/duanbb/oracle/oradata/mydb/undotbs01.dbf 3/home/duanbb/oracle/oradata/mydb/sysaux01.dbf 2file_name-------------------------------------------------------------------------------- file_id----------/home/duanbb/oracle/oradata/mydb/system01.dbf 1/home/duanbb/oracle/oradata/mydb/example01.dbf 5 
              value: 4  - means to users01.dbf
dba - database block address              value: 0x01000195
                  file no: 4
                  block no: 0x195
obj - object              value: 71329
scn - system change number              value: 0x0000.000fdd5e
                  wrap: 0x0000
                  base:  0xfdd5e
seq - sequence number              value: 2
op - operation code 
each change vector has an operation code. in oracle 9.2 there were over 150 redo log operations; this number has grown significantly in oracle 10.2 though the exact figure is not known. the operation code consists of a major number and a minor number.
the major number describes the level in the kernel where the redo is generated. the following table shows common levels:
  level description
4 block cleanout
5 transaction layer (undo)
10 index operation
11 table operation (dml)
13 block allocation
14 extent allocation
17 backup management
18 online backup
19 direct load
20 transaction metadata (logminer)
22 space management (assm)
23 block write (dbwr)
24 ddl statement
for table operation(dml), description as follows:
code mnemonic description
11.1 iur undo
11.2 irp insert row piece
11.3 drp delete row piece
11.4 lkr lock row
11.5 urp update row piece
11.6 orp overflow row piece
11.7 mfc  
11.8 cfa  
11.9 cki  
11.10 skl  
11.11 qmi insert row array
11.12 qmd delete row array
11.14 dsc  
11.16 lmn  
11.17 llb  
11.19 19 update row array
11.20 shk  
11.21 21
for transaction layer (undo), description as follows:
  code mnemonic description
5.1 1 undo recorder
5.2 2 undo header
5.4 4 commit
values: 11.19
ktb redo op: 0x01 ver: 0x01 compat bit: 4 (post-11) padding: 1op: f xid: 0x000a.005.0000035a uba: 0x00c00478.01ca.28
ktb redo
ktb redo records modifications to the transaction header of a block. the inverse operations are recorded in the undo segment
each ktb redo record has an operation type. known codes include:
  numeric code alphanumeric code
0x1 f
0x2 c
0x3 z
0x4 l
0x5 r
0x11 f
op: 0x01 - numeric codever: 0x01op: f - alphanumeric codexid: transaction id. format is usn#.slot#.wrap# components are:
  usn# undo segment number
slot# slot number in undo segment
wrap# sequence number
value: 0x000a.005.0000035a
        usn: 0x000a
        slot: 0x005
        wrap: 0x0000035a
uba: uba undo block address. format is dba.seq#.rec# components are:  dba data block address of undo block
seq# sequence number of undo block
rec# record number within undo block
value: 0x00c00478.01ca.28
                dba: 0x00c00478
                seq: 0x01ca
                rec:  0x28
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 15
tabn - specifies the table number. for non-clustered tables this will always be 0slot - specifies the slot number. each block has an variable length array of slots. each element in this array specifies the location of a row within the block. the first slot in the block is 0. in this example the row was written to the third  slot in the table (slot 2)flag - unknownlock - probably set to 1 indicating a lock has been taken on the row header, what's the mean 2?ckix - unknownncol: 2 nnew: 1 size: 0
ncol - number of columns in row piecennew - number of changed columns in row piecesize - (probably) change in size of row piecekdo op code: 21 row dependencies disabled
operation code: update row piece row dependencies - specifies whether row dependencies are disabled (default) or enabled for this tablextype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
xtype - transaction type. can be xa, xr, cr or kdo_kdom2. in this case the transaction type is kdo_kdom2. this structure can potentially store an array of change vectors for an object.flags - unknownbdba - block dba. data block address of this blockhdba - header dba. probably data block address of extent header 
itli: 2 ispac: 0 maxfr: 4858
itli - specifes the itl slot number of the transaction performing the operation. in this example the row is locked by the transaction in the first itl slot.ispac - unknownmaxfr - unknownvect = 3col 1: [ 3] 64 64 64
update of column 1 (name) to 'ddd'
change #2:
change #2 typ:0 cls:35 afn:3 dba:0x00c00099 obj:4294967295 scn:0x0000.000fdd85 seq: 1 op:5.2ktudh redo: slt: 0x0005 sqn: 0x0000035a flg: 0x0012 siz: 184 fbi: 0 uba: 0x00c00478.01ca.28 pxid: 0x0000.000.00000000
change header:
change #2 typ:0 cls:35 afn:3 dba:0x00c00099 obj:4294967295 scn:0x0000.000fdd85 seq: 1 op:5.2
typ:  0cls: 35afn: 3  - refer to undotbs01.dbfdba: 0x00c00099obj:  4294967259scn: 0x0000.000fdd85seq: 1op: 5.2  -  means undo header change body:
ktudh redo: slt: 0x000f sqn: 0x00000312 flg: 0x0012 siz: 156 fbi: 0 uba: 0x00c005ba.02c2.19 pxid: 0x0000.000.00000000
change #3:
change #3 typ:0 cls:35 afn:3 dba:0x00c00099 obj:4294967295 scn:0x0000.000fddbd seq: 1 op:5.4ktucm redo: slt: 0x0005 sqn: 0x0000035a srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c00478.01ca.28 ext: 2 spc: 3182 fbi: 0
change header:
change #3 typ:0 cls:23 afn:3 dba:0x00c00039 obj:4294967295 scn:0x0000.000fddc3 seq: 1 op:5.4
typ:  0cls: 35afn: 3  - refer to undotbs01.dbfdba: 0x00c00039obj:  4294967295scn: 0x0000.000fddc3seq: 1op: 5.4  -  means commit change #4:
change #4 typ:0 cls:36 afn:3 dba:0x00c00478 obj:4294967295 scn:0x0000.000fdd84 seq: 1 op:5.1ktudb redo: siz: 184 spc: 3368 flg: 0x0012 seq: 0x01ca rec: 0x28 xid: 0x000a.005.0000035a ktubl redo: slt: 5 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no 0x00000000 prev ctl uba: 0x00c00478.01ca.27 prev ctl max cmt scn: 0x0000.000fd7ee prev tx cmt scn: 0x0000.000fd7fa txn start scn: 0x0000.000fdd5e logon user: 106 prev brb: 12584054 prev bcl: 0 buext idx: 0 flg2: 0kdo undo record:ktb redo op: 0x04 ver: 0x01 compat bit: 4 (post-11) padding: 1op: l itl: xid: 0x0004.020.000002ef uba: 0x00c0011b.02c1.0a flg: c--- lkc: 0 scn: 0x0000.000f25f5array update of 1 rows: tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 2 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 63 63 63
change header:
change #4 typ:0 cls:24 afn:3 dba:0x00c005ba obj:4294967295 scn:0x0000.000fdd8a seq: 3 op:5.1
typ:  0cls: 24afn: 3  - refer to undotbs01.dbfdba: 0x00c005baobj:  4294967295scn: 0x0000.000fdd8aseq: 3op: 5.1  -  means undo recorder change body:
logon user: 106 - current user id, confirmed as follows:sql> select user,uid from dual;user uid------------------------------ ----------mydb1 106
rollback:
opration:
sql> select * from test_user; id name---------- -------------------- 1 aaa 2 222 3 111sql> sql> update test_user set name='999' where id=3;1 row updated.sql> rollback;rollback complete.
redo log:
redo record - thread:1 rba: 0x00000b.0000e166.016c len: 0x01b8 vld: 0x09scn: 0x0000.0011db22 subscn: 1 12/27/2010 13:28:52change #1 typ:0 cls: 1 afn:4 dba:0x01000195 obj:71329 scn:0x0000.0011cbe9 seq: 1 op:11.19ktb redoop: 0x01 ver: 0x01compat bit: 4 (post-11) padding: 1op: f xid: 0x0006.008.0000042c uba: 0x00c000d6.01ed.03array update of 1 rows:tabn: 0 slot: 2(0x2) flag: 0x2c lock: 1 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 39 39 39change #2 typ:0 cls:27 afn:3 dba:0x00c00059 obj:4294967295 scn:0x0000.0011db19 seq: 2 op:5.2ktudh redo: slt: 0x0008 sqn: 0x0000042c flg: 0x0012 siz: 184 fbi: 0 uba: 0x00c000d6.01ed.03 pxid: 0x0000.000.00000000change #3 typ:0 cls:28 afn:3 dba:0x00c000d6 obj:4294967295 scn:0x0000.0011db19 seq: 1 op:5.1ktudb redo: siz: 184 spc: 7914 flg: 0x0012 seq: 0x01ed rec: 0x03 xid: 0x0006.008.0000042cktubl redo: slt: 8 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4undo type: regular undo begin trans last buffer split: notemp object: notablespace undo: no 0x00000000 prev ctl uba: 0x00c000d6.01ed.02prev ctl max cmt scn: 0x0000.0011d79d prev tx cmt scn: 0x0000.0011d7bctxn start scn: 0x0000.0011cbea logon user: 106 prev brb: 12583123 prev bcl: 0 buext idx: 0 flg2: 0kdo undo record:ktb redoop: 0x04 ver: 0x01compat bit: 4 (post-11) padding: 1op: l itl: xid: 0x0001.001.00000350 uba: 0x00c00010.0228.1e flg: c--- lkc: 0 scn: 0x0000.0011ca07array update of 1 rows:tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 31 31 31 redo record - thread:1 rba: 0x00000b.0000e167.0134 len: 0x00e0 vld: 0x01scn: 0x0000.0011db22 subscn: 2 12/27/2010 13:28:52change #1 typ:0 cls: 1 afn:4 dba:0x01000195 obj:71329 scn:0x0000.0011db22 seq: 1 op:11.19ktb redoop: 0x04 ver: 0x01compat bit: 4 (post-11) padding: 1op: l itl: xid: 0x0001.001.00000350 uba: 0x00c00010.0228.1e flg: c--- lkc: 0 scn: 0x0000.0011ca07array update of 1 rows:tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xrxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 31 31 31change #2 typ:0 cls:27 afn:3 dba:0x00c00059 obj:4294967295 scn:0x0000.0011db22 seq: 1 op:5.11ktubu redo: slt: 8 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4undo type: regular undo undo type: user undo done begin trans last buffer split: notablespace undo: no 0x00000000buext idx: 0flg2: 0 redo record - thread:1 rba: 0x00000b.0000e168.0024 len: 0x0050 vld: 0x01scn: 0x0000.0011db23 subscn: 1 12/27/2010 13:28:52change #1 typ:0 cls:27 afn:3 dba:0x00c00059 obj:4294967295 scn:0x0000.0011db22 seq: 2 op:5.4ktucm redo: slt: 0x0008 sqn: 0x0000042c srt: 0 sta: 9 flg: 0x4rolled back transaction
update multiple rows:
operation:
sql> select * from test_user; id name---------- -------------------- 1 aaa 2 222 3 111sql> sql> update test_user set name='333';3 rows updated.
redo log:
redo record - thread:1 rba: 0x00000b.0001031f.013c len: 0x0250 vld: 0x09scn: 0x0000.0011ea91 subscn: 1 12/27/2010 15:05:47 change #1 typ:0 cls: 1 afn:4 dba:0x01000195 obj:71329 scn:0x0000.0011db22 seq: 2 op:11.19 ktb redo op: 0x01 ver: 0x01 compat bit: 4 (post-11) padding: 1op: f xid: 0x0001.01b.00000355 uba: 0x00c000f4.022b.15array update of 3 rows: tabn: 0 slot: 0(0x0) flag: 0x2c lock: 1 ckix: 15 ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 33 33 33 tabn: 0 slot: 1(0x1) flag: 0x2c lock: 1 ckix: 15 ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 33 33 33 tabn: 0 slot: 2(0x2) flag: 0x2c lock: 1 ckix: 15 ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 33 33 33change #2 typ:0 cls:17 afn:3 dba:0x00c00009 obj:4294967295 scn:0x0000.0011ea48 seq: 2 op:5.2ktudh redo: slt: 0x001b sqn: 0x00000355 flg: 0x0012 siz: 260 fbi: 0 uba: 0x00c000f4.022b.15 pxid: 0x0000.000.00000000change #3 typ:0 cls:18 afn:3 dba:0x00c000f4 obj:4294967295 scn:0x0000.0011ea48 seq: 15 op:5.1ktudb redo: siz: 260 spc: 5766 flg: 0x0012 seq: 0x022b rec: 0x15 xid: 0x0001.01b.00000355ktubl redo: slt: 27 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4undo type: regular undo begin trans last buffer split: notemp object: notablespace undo: no 0x00000000 prev ctl uba: 0x00c000f4.022b.06prev ctl max cmt scn: 0x0000.0011e534 prev tx cmt scn: 0x0000.0011e57btxn start scn: 0x0000.0011ea91 logon user: 106 prev brb: 12583064 prev bcl: 0 buext idx: 0 flg2: 0kdo undo record:ktb redoop: 0x04 ver: 0x01compat bit: 4 (post-11) padding: 1op: l itl: xid: 0x0001.001.00000350 uba: 0x00c00010.0228.1e flg: c--- lkc: 0 scn: 0x0000.0011ca07array update of 3 rows:tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 61 61 61tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 32 32 32tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15ncol: 2 nnew: 1 size: 0kdo op code: 21 row dependencies disabled xtype: xaxtype kdo_kdom2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858vect = 3col 1: [ 3] 31 31 31
multi operation one commit:
operation:
sql> select * from test_user; id name---------- -------------------- 1 111 2 222 3 333sql> update test_user set name='aaa' where id=1;1 row updated.sql> update test_user set name='bbb' where id=2;1 row updated.sql> commit;commit complete.
redo log:
redo record - thread:1 rba: 0x000019.00001837.0010 len: 0x0224 vld: 0x05scn: 0x0000.00178fd4 subscn: 1 01/06/2011 16:11:12change #1 typ:0 cls:17 afn:3 dba:0x00c00009 obj:4294967295 scn:0x0000.00178f8c seq: 1 op:5.2 ktudh redo: slt: 0x0007 sqn: 0x0000042d flg: 0x0012 siz: 184 fbi: 0 uba: 0x00c00a7d.029a.15 pxid: 0x0000.000.00000000change #2 typ:0 cls:18 afn:3 dba:0x00c00a7d obj:4294967295 scn:0x0000.00178f8b seq: 3 op:5.1 ktudb redo: siz: 184 spc: 5486 flg: 0x0012 seq: 0x029a rec: 0x15 xid: 0x0001.007.0000042d ktubl redo: slt: 7 rci: 0 opc: 11.1 objn: 71329 objd: 71828 tsn: 4 undo type: regular undo begin trans last buffer split: no temp object: no tablespace undo: no 0x00000000 prev ctl uba: 0x00c00a7d.029a.12 prev ctl max cmt scn: 0x0000.001789db prev tx cmt scn: 0x0000.001789eb txn start scn: 0xffff.ffffffff logon user: 106 prev brb: 12585591 prev bcl: 0 buext idx: 0 flg2: 0kdo undo record:ktb redo op: 0x04 ver: 0x01 compat bit: 4 (post-11) padding: 1op: l itl: xid: 0x0005.013.00000551 uba: 0x00c00e6f.01ff.0e flg: c--- lkc: 0 scn: 0x0000.0017875ckdo op code: urp row dependencies disabled xtype: xa flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0ncol: 2 nnew: 1 size: 0col 1: [ 3] 31 31 31change #3 typ:2 cls: 1 afn:4 dba:0x01000198 obj:71828 scn:0x0000.00178ead seq: 1 op:11.5ktb redoop: 0x11 ver: 0x01compat bit: 4 (post-11) padding: 1op: f xid: 0x0001.007.0000042d uba: 0x00c00a7d.029a.15block cleanout record, scn: 0x0000.00178fd4 ver: 0x01 opt: 0x02, entries follow... itli: 2 flg: 2 scn: 0x0000.00178eadkdo op code: urp row dependencies disabled xtype: xa flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858tabn: 0 slot: 0(0x0) flag: 0x2c lock: 1 ckix: 0ncol: 2 nnew: 1 size: 0col 1: [ 3] 61 61 61change #4 media recovery marker scn:0x0000.00000000 seq: 0 op:5.20session number = 113serial number = 2027transaction name =version 185599488audit sessionid 203728redo record - thread:1 rba: 0x000019.00001943.0010 len: 0x0140 vld: 0x05scn: 0x0000.0017902a subscn: 1 01/06/2011 16:11:30change #1 typ:0 cls:18 afn:3 dba:0x00c00a7d obj:4294967295 scn:0x0000.00178fd4 seq: 1 op:5.1ktudb redo: siz: 116 spc: 5300 flg: 0x0022 seq: 0x029a rec: 0x16 xid: 0x0001.007.0000042dktubu redo: slt: 7 rci: 21 opc: 11.1 objn: 71329 objd: 71828 tsn: 4undo type: regular undo undo type: last buffer split: notablespace undo: no 0x00000000kdo undo record:ktb redoop: 0x02 ver: 0x01compat bit: 4 (post-11) padding: 1op: c uba: 0x00c00a7d.029a.15kdo op code: urp row dependencies disabled xtype: xa flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 0ncol: 2 nnew: 1 size: 0col 1: [ 3] 32 32 32change #2 typ:0 cls: 1 afn:4 dba:0x01000198 obj:71828 scn:0x0000.00178fd4 seq: 1 op:11.5ktb redoop: 0x02 ver: 0x01compat bit: 4 (post-11) padding: 1op: c uba: 0x00c00a7d.029a.16kdo op code: urp row dependencies disabled xtype: xa flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193itli: 1 ispac: 0 maxfr: 4858tabn: 0 slot: 1(0x1) flag: 0x2c lock: 1 ckix: 0ncol: 2 nnew: 1 size: 0col 1: [ 3] 62 62 62redo record - thread:1 rba: 0x000019.0000194c.0010 len: 0x00bc vld: 0x05scn: 0x0000.00179033 subscn: 1 01/06/2011 16:11:37change #1 typ:0 cls:17 afn:3 dba:0x00c00009 obj:4294967295 scn:0x0000.00178fd4 seq: 1 op:5.4ktucm redo: slt: 0x0007 sqn: 0x0000042d srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c00a7d.029a.16 ext: 2 spc: 5182 fbi: 0change #2 media recovery marker scn:0x0000.00000000 seq: 0 op:24.11krv cmt marker usn: 0x1 start scn: 0x0000.00178fd4
reference:
http://www.juliandyke.com/internals/redo/redo.html
其它类似信息

推荐信息