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 table
SQL> 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: 0x0d
SCN: 0x0000.000fddbd SUBSCN: 1 12/21/2010 16:30:29
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: 1
op: F xid: 0x000a.005.0000035a uba: 0x00c00478.01ca.28
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 2 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 64 64 64
CHANGE #2 TYP:0 CLS:35 AFN:3 DBA:0x00c00099 OBJ:4294967295 SCN:0x0000.000fdd85 SEQ: 1 OP:5.2
ktudh redo: slt: 0x0005 sqn: 0x0000035a flg: 0x0012 siz: 184 fbi: 0
uba: 0x00c00478.01ca.28 pxid: 0x0000.000.00000000
CHANGE #3 TYP:0 CLS:35 AFN:3 DBA:0x00c00099 OBJ:4294967295 SCN:0x0000.000fddbd SEQ: 1 OP:5.4
ktucm 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.1
ktudb 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: 4
Undo 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: 0
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: L itl: xid: 0x0004.020.000002ef uba: 0x00c0011b.02c1.0a
flg: C--- lkc: 0 scn: 0x0000.000f25f5
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 2 ispac: 0 maxfr: 4858
vect = 3
col 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: 0x0d
SCN: 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: 1
op: F xid: 0x000a.005.0000035a uba: 0x00c00478.01ca.28
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 2 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 2 ispac: 0 maxfr: 4858
vect = 3
col 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
2
FILE_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: 1
op: 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 Code
ver: 0x01
op: F - Alphanumeric Code
xid: 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 0
slot - 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 - Unknown
lock - probably set to 1 indicating a lock has been taken on the row header, what's the mean 2?
ckix - Unknown
ncol: 2 nnew: 1 size: 0
ncol - Number of columns in row piece
nnew - Number of changed columns in row piece
size - (Probably) change in size of row piece
KDO Op code: 21 row dependencies Disabled
Operation code: Update Row Piece
row dependencies - specifies whether row dependencies are disabled (default) or enabled for this table
xtype: 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 - Unknown
bdba - block DBA. Data block address of this block
hdba - 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 - Unknown
maxfr - Unknown
vect = 3
col 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.2
ktudh 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: 0
CLS: 35
AFN: 3 - refer to "undotbs01.dbf"
DBA: 0x00c00099
OBJ: 4294967259
SCN: 0x0000.000fdd85
SEQ: 1
OP: 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.4
ktucm 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: 0
CLS: 35
AFN: 3 - refer to "undotbs01.dbf"
DBA: 0x00c00039
OBJ: 4294967295
SCN: 0x0000.000fddc3
SEQ: 1
OP: 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.1
ktudb 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: 4
Undo 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: 0
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: L itl: xid: 0x0004.020.000002ef uba: 0x00c0011b.02c1.0a
flg: C--- lkc: 0 scn: 0x0000.000f25f5
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 2 ispac: 0 maxfr: 4858
vect = 3
col 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: 0
CLS: 24
AFN: 3 - refer to "undotbs01.dbf"
DBA: 0x00c005ba
OBJ: 4294967295
SCN: 0x0000.000fdd8a
SEQ: 3
OP: 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 111
SQL>
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: 0x09
SCN: 0x0000.0011db22 SUBSCN: 1 12/27/2010 13:28:52
CHANGE #1 TYP:0 CLS: 1 AFN:4 DBA:0x01000195 OBJ:71329 SCN:0x0000.0011cbe9 SEQ: 1 OP:11.19
KTB Redo
op: 0x01 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: F xid: 0x0006.008.0000042c uba: 0x00c000d6.01ed.03
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 1 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 39 39 39
CHANGE #2 TYP:0 CLS:27 AFN:3 DBA:0x00c00059 OBJ:4294967295 SCN:0x0000.0011db19 SEQ: 2 OP:5.2
ktudh redo: slt: 0x0008 sqn: 0x0000042c flg: 0x0012 siz: 184 fbi: 0
uba: 0x00c000d6.01ed.03 pxid: 0x0000.000.00000000
CHANGE #3 TYP:0 CLS:28 AFN:3 DBA:0x00c000d6 OBJ:4294967295 SCN:0x0000.0011db19 SEQ: 1 OP:5.1
ktudb redo: siz: 184 spc: 7914 flg: 0x0012 seq: 0x01ed rec: 0x03
xid: 0x0006.008.0000042c
ktubl redo: slt: 8 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x00c000d6.01ed.02
prev ctl max cmt scn: 0x0000.0011d79d prev tx cmt scn: 0x0000.0011d7bc
txn start scn: 0x0000.0011cbea logon user: 106 prev brb: 12583123 prev bcl: 0 BuExt idx: 0 flg2: 0
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: L itl: xid: 0x0001.001.00000350 uba: 0x00c00010.0228.1e
flg: C--- lkc: 0 scn: 0x0000.0011ca07
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 31 31 31
REDO RECORD - Thread:1 RBA: 0x00000b.0000e167.0134 LEN: 0x00e0 VLD: 0x01
SCN: 0x0000.0011db22 SUBSCN: 2 12/27/2010 13:28:52
CHANGE #1 TYP:0 CLS: 1 AFN:4 DBA:0x01000195 OBJ:71329 SCN:0x0000.0011db22 SEQ: 1 OP:11.19
KTB Redo
op: 0x04 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: L itl: xid: 0x0001.001.00000350 uba: 0x00c00010.0228.1e
flg: C--- lkc: 0 scn: 0x0000.0011ca07
Array Update of 1 rows:
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XRxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 31 31 31
CHANGE #2 TYP:0 CLS:27 AFN:3 DBA:0x00c00059 OBJ:4294967295 SCN:0x0000.0011db22 SEQ: 1 OP:5.11
ktubu redo: slt: 8 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4
Undo type: Regular undo Undo type: User undo done Begin trans Last buffer split: No
Tablespace Undo: No
0x00000000
BuExt idx: 0flg2: 0
REDO RECORD - Thread:1 RBA: 0x00000b.0000e168.0024 LEN: 0x0050 VLD: 0x01
SCN: 0x0000.0011db23 SUBSCN: 1 12/27/2010 13:28:52
CHANGE #1 TYP:0 CLS:27 AFN:3 DBA:0x00c00059 OBJ:4294967295 SCN:0x0000.0011db22 SEQ: 2 OP:5.4
ktucm redo: slt: 0x0008 sqn: 0x0000042c srt: 0 sta: 9 flg: 0x4
rolled back transaction
Update Multiple rows:
Operation:
SQL> select * from test_user;
ID NAME
---------- --------------------
1 aaa
2 222
3 111
SQL>
SQL> update test_user set name='333';
3 rows updated.
Redo Log:
REDO RECORD - Thread:1 RBA: 0x00000b.0001031f.013c LEN: 0x0250 VLD: 0x09
SCN: 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: 1
op: F xid: 0x0001.01b.00000355 uba: 0x00c000f4.022b.15
Array Update of 3 rows:
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 1 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 33 33 33
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 1 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 33 33 33
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 1 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 33 33 33
CHANGE #2 TYP:0 CLS:17 AFN:3 DBA:0x00c00009 OBJ:4294967295 SCN:0x0000.0011ea48 SEQ: 2 OP:5.2
ktudh redo: slt: 0x001b sqn: 0x00000355 flg: 0x0012 siz: 260 fbi: 0
uba: 0x00c000f4.022b.15 pxid: 0x0000.000.00000000
CHANGE #3 TYP:0 CLS:18 AFN:3 DBA:0x00c000f4 OBJ:4294967295 SCN:0x0000.0011ea48 SEQ: 15 OP:5.1
ktudb redo: siz: 260 spc: 5766 flg: 0x0012 seq: 0x022b rec: 0x15
xid: 0x0001.01b.00000355
ktubl redo: slt: 27 rci: 0 opc: 11.1 objn: 71329 objd: 71329 tsn: 4
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x00c000f4.022b.06
prev ctl max cmt scn: 0x0000.0011e534 prev tx cmt scn: 0x0000.0011e57b
txn start scn: 0x0000.0011ea91 logon user: 106 prev brb: 12583064 prev bcl: 0 BuExt idx: 0 flg2: 0
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: L itl: xid: 0x0001.001.00000350 uba: 0x00c00010.0228.1e
flg: C--- lkc: 0 scn: 0x0000.0011ca07
Array Update of 3 rows:
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 61 61 61
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 32 32 32
tabn: 0 slot: 2(0x2) flag: 0x2c lock: 0 ckix: 15
ncol: 2 nnew: 1 size: 0
KDO Op code: 21 row dependencies Disabled
xtype: XAxtype KDO_KDOM2 flags: 0x00000080 bdba: 0x01000195 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
vect = 3
col 1: [ 3] 31 31 31
Multi Operation One Commit:
operation:
SQL> select * from test_user;
ID NAME
---------- --------------------
1 111
2 222
3 333
SQL> 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: 0x05
SCN: 0x0000.00178fd4 SUBSCN: 1 01/06/2011 16:11:12
CHANGE #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.00000000
CHANGE #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: 0
KDO undo record:
KTB Redo
op: 0x04 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: L itl: xid: 0x0005.013.00000551 uba: 0x00c00e6f.01ff.0e
flg: C--- lkc: 0 scn: 0x0000.0017875c
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0
ncol: 2 nnew: 1 size: 0
col 1: [ 3] 31 31 31
CHANGE #3 TYP:2 CLS: 1 AFN:4 DBA:0x01000198 OBJ:71828 SCN:0x0000.00178ead SEQ: 1 OP:11.5
KTB Redo
op: 0x11 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: F xid: 0x0001.007.0000042d uba: 0x00c00a7d.029a.15
Block cleanout record, scn: 0x0000.00178fd4 ver: 0x01 opt: 0x02, entries follow...
itli: 2 flg: 2 scn: 0x0000.00178ead
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 1 ckix: 0
ncol: 2 nnew: 1 size: 0
col 1: [ 3] 61 61 61
CHANGE #4 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ: 0 OP:5.20
session number = 113
serial number = 2027
transaction name =
version 185599488
audit sessionid 203728
REDO RECORD - Thread:1 RBA: 0x000019.00001943.0010 LEN: 0x0140 VLD: 0x05
SCN: 0x0000.0017902a SUBSCN: 1 01/06/2011 16:11:30
CHANGE #1 TYP:0 CLS:18 AFN:3 DBA:0x00c00a7d OBJ:4294967295 SCN:0x0000.00178fd4 SEQ: 1 OP:5.1
ktudb redo: siz: 116 spc: 5300 flg: 0x0022 seq: 0x029a rec: 0x16
xid: 0x0001.007.0000042d
ktubu redo: slt: 7 rci: 21 opc: 11.1 objn: 71329 objd: 71828 tsn: 4
Undo type: Regular undo Undo type: Last buffer split: No
Tablespace Undo: No
0x00000000
KDO undo record:
KTB Redo
op: 0x02 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: C uba: 0x00c00a7d.029a.15
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 0
ncol: 2 nnew: 1 size: 0
col 1: [ 3] 32 32 32
CHANGE #2 TYP:0 CLS: 1 AFN:4 DBA:0x01000198 OBJ:71828 SCN:0x0000.00178fd4 SEQ: 1 OP:11.5
KTB Redo
op: 0x02 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: C uba: 0x00c00a7d.029a.16
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x01000198 hdba: 0x01000193
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 1 ckix: 0
ncol: 2 nnew: 1 size: 0
col 1: [ 3] 62 62 62
REDO RECORD - Thread:1 RBA: 0x000019.0000194c.0010 LEN: 0x00bc VLD: 0x05
SCN: 0x0000.00179033 SUBSCN: 1 01/06/2011 16:11:37
CHANGE #1 TYP:0 CLS:17 AFN:3 DBA:0x00c00009 OBJ:4294967295 SCN:0x0000.00178fd4 SEQ: 1 OP:5.4
ktucm redo: slt: 0x0007 sqn: 0x0000042d srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c00a7d.029a.16 ext: 2 spc: 5182 fbi: 0
CHANGE #2 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ: 0 OP:24.11
KRV CMT marker usn: 0x1 start scn: 0x0000.00178fd4
Reference:
http://www.juliandyke.com/Internals/Redo/Redo.html
本文原创发布php中文网,转载请注明出处,感谢您的尊重!