8 redo log内部结构分析(IMU/非IMU)--update示例
Oracle内核的进步 ---- 新、老Redo机制对比
体系结构
非IMU下的redo产生过程
--分析redo log(update)
SQL> set sqlprompt "_USER@ _CONNECT_IDENTIFIER >"
SYS@ orcl >@?/rdbms/admin/show_para
Enter value for p: in_memory_undo
old 12: AND upper(i.ksppinm) LIKE upper('%&p%')
new 12: AND upper(i.ksppinm) LIKE upper('%in_memory_undo%')
P_NAME P_DESCRIPTION P_VALUE ISDEFAULT ISMODIFIED ISADJ
---------------------------------------- -------------------------------------------------- ------------------------------ --------- ---------- -----
_in_memory_undo Make in memory undo for top level transactions TRUE TRUE FALSE FALSE
SYS@ orcl >set linesize 1000
create table redo_test(id int,name varchar2(20));
insert into redo_test(id,name)values(1,'AAAAAAAAAAA');
insert into redo_test(id,name)values(2,'BBBBBBBBBBBBB');
COMMIT;
SYS@ orcl >SELECT * FROM TEST.REDO_TEST;
ID NAME
---------- --------------------
1 AAAAAAAAAAA
2 BBBBBBBBBBBBB SYS@ orcl >alter system switch logfile;
System altered.
SYS@ orcl >select * from v$Log; GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
1 1 7 52428800 512 2 NO INACTIVE 9800422 12-JUN-19 9800537 12-JUN-19
2 1 8 52428800 512 1 NO ACTIVE 9800537 12-JUN-19 9803089 12-JUN-19
3 1 9 52428800 512 1 NO CURRENT 9803089 12-JUN-19 2.8147E+14
[root@DSI ~]# strings /u01/app/oracle/oradata/orcl/redo03.log |grep redo_test
[root@DSI ~]# strings /u01/app/oracle/oradata/orcl/redo02.log |grep redo_test
create table redo_test(id int,name varchar2(20))
SYS@ orcl >alter system set "_in_memory_undo"=false;
System altered.
SYS@ orcl >select * from test.redo_test; ID NAME
---------- --------------------
1 AAAAAAAAAAA
2 BBBBBBBBBBBBB SYS@ orcl >update test.redo_test set name='cccccc' where rownum<=2;
2 rows updated. SYS@ orcl >commit;
Commit complete. SYS@ orcl >select object_id from user_objects where object_name='REDO_TEST';
no rows selected SYS@ orcl >conn test/test
Connected.
TEST@ orcl >select object_id from user_objects where object_name='REDO_TEST';
OBJECT_ID
----------
87535
TEST@ orcl >conn / as sysdba
Connected.
SYS@ orcl > alter system dump logfile '/u01/app/oracle/oradata/orcl/redo03.log';
System altered.
SYS@ orcl >oradebug setmypid
Statement processed.
SYS@ orcl >oradebug tracefile_name
/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_3137.trc
[root@DSI ~]# vim /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_3137.trc
##根据上面查到的object_id=87535 去日志中搜索
三条日志:
第一条日志:
日志头
OP=5.2 ==>事务开始了
OP=5.1 ==>把数据前的值放到UNDO块
OP=11.5 ==>update修改数据
第二条日志:
日志头
OP=5.1 ==>把数据前的值放到UNDO块
OP=11.5 ==>update修改数据
第三条日志:
日志头
OP=5.4 ==>提交(事务结束)
三条日志:REDO RECORD
第一个REDO RECORD: REDO RECORD头+CHANGE VECTOR组成(一个CV就是一个操作),由三个CV组成
REDO RECORD - Thread:1 RBA: 0x000009.00000289.0010 LEN: 0x0224 VLD: 0x05
SCN: 0x0000.00959714 SUBSCN: 1 06/12/2019 16:20:54
(LWN RBA: 0x000009.00000289.0010 LEN: 0002 NST: 0001 SCN: 0x0000.00959713)
-------------------------------------------------------》REDO RECORD头
RBA: 0x000009.00000289.0010==(由三部分组成序列号,块号,偏移量或着叫第几个字节)--redo log循环写,0x000009日志序列号累加(对应v$Log中SEQUENCE#的值)
LEN: 0x0224:一条日志的长度
VLD: 0x05 :日志类型 CHANGE #1 TYP:0 CLS:25 AFN:3 DBA:0x00c000c0 OBJ:4294967295 SCN:0x0000.00959703 SEQ:1 OP:5.2 ENC:0 RBL:0
ktudh redo: slt: 0x0003 sqn: 0x0000202f flg: 0x0012 siz: 168 fbi: 0
uba: 0x00c028ae.01ae.0a pxid: 0x0000.000.00000000
------------------------------------------------------------------------->UNDO段头事务表
OP:5.2==》OPRATION CODE 向UNDO段的段头的事务表写事务信息
TYP:0(普通块)
CLS:25 (CLASS)
AFN:3 (绝对文件号)
DBA:0x00c000c0 数据块的地址
OBJ:4294967295 FFFFFFFF
SCN:0x0000.00959703 产生事务的时间 CHANGE #2 TYP:0 CLS:26 AFN:3 DBA:0x00c028ae OBJ:4294967295 SCN:0x0000.00959702 SEQ:3 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 168 spc: 6416 flg: 0x0012 seq: 0x01ae rec: 0x0a
xid: 0x0005.003.0000202f
ktubl redo: slt: 3 rci: 0 opc: 11.1 [objn: 87535 objd: 87535 tsn: 5]
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x00c028ae.01ae.07
prev ctl max cmt scn: 0x0000.00959318 prev tx cmt scn: 0x0000.00959328
txn start scn: 0xffff.ffffffff logon user: 0 prev brb: 12593324 prev bcl: 0 BuExt idx: 0 flg2: 0
KDO undo record:
KTB Redo
op: 0x03 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: Z
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0
ncol: 2 nnew: 1 size: 5
col 1: [] 41 41 41 41 41 41 41 41 41 41 41
————————————————————————————————》undo数据块 CHANGE #3 TYP:2 CLS:1 AFN:5 DBA:0x0140313f OBJ:87535 SCN:0x0000.0095953a SEQ:1 OP:11.5 ENC:0 RBL:0
KTB Redo
op: 0x11 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: F xid: 0x0005.003.0000202f uba: 0x00c028ae.01ae.0a
Block cleanout record, scn: 0x0000.00959714 ver: 0x01 opt: 0x02, entries follow...
itli: 1 flg: 2 scn: 0x0000.0095953a
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 2 ckix: 0
ncol: 2 nnew: 1 size: -5
col 1: [] 63 63 63 63 63 63
-----------------------------------------------------------》数据修改后的值
OP:11.5===》UPDATE操作
第二条REDO
REDO RECORD - Thread:1 RBA: 0x000009.0000028a.0044 LEN: 0x0124 VLD: 0x01
SCN: 0x0000.00959714 SUBSCN: 2 06/12/2019 16:20:54
CHANGE #1 TYP:0 CLS:26 AFN:3 DBA:0x00c028ae OBJ:4294967295 SCN:0x0000.00959714 SEQ:1 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 128 spc: 6246 flg: 0x0022 seq: 0x01ae rec: 0x0b
xid: 0x0005.003.0000202f
ktubu redo: slt: 3 rci: 10 opc: 11.1 objn: 87535 objd: 87535 tsn: 5
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: 0x00c028ae.01ae.0a
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 0
ncol: 2 nnew: 1 size: 7
col 1: [] 42 42 42 42 42 42 42 42 42 42 42 42 42
CHANGE #2 TYP:0 CLS:1 AFN:5 DBA:0x0140313f OBJ:87535 SCN:0x0000.00959714 SEQ:1 OP:11.5 ENC:0 RBL:0
KTB Redo
op: 0x02 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: C uba: 0x00c028ae.01ae.0b
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 2 ckix: 0
ncol: 2 nnew: 1 size: -7
col 1: [] 63 63 63 63 63 63
第三条RECORD 提交OP:5.4作为单独的一条RECORD
REDO RECORD - Thread:1 RBA: 0x000009.0000028b.0010 LEN: 0x00d0 VLD: 0x05
SCN: 0x0000.00959716 SUBSCN: 1 06/12/2019 16:20:56
(LWN RBA: 0x000009.0000028b.0010 LEN: 0001 NST: 0001 SCN: 0x0000.00959715)
CHANGE #1 TYP:0 CLS:25 AFN:3 DBA:0x00c000c0 OBJ:4294967295 SCN:0x0000.00959714 SEQ:1 OP:5.4 ENC:0 RBL:0
ktucm redo: slt: 0x0003 sqn: 0x0000202f srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c028ae.01ae.0b ext: 2 spc: 6116 fbi: 0
CHANGE #2 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ:0 OP:24.4 ENC:0
非IMU下,在一个事务下面分别做两条UPDATE
SYS@ orcl >update test.redo_test set name='aaa' where id=1;
1 row updated. SYS@ orcl >update test.redo_test set name='bbb' where id=2;
1 row updated. SYS@ orcl >commit;
Commit complete. REDO RECORD - Thread:1 RBA: 0x000009.000002ed.0010 LEN: 0x0144 VLD: 0x05
SCN: 0x0000.009598d3 SUBSCN: 1 06/12/2019 16:39:56
(LWN RBA: 0x000009.000002ed.0010 LEN: 0001 NST: 0001 SCN: 0x0000.009598d2)
CHANGE #1 TYP:0 CLS:34 AFN:3 DBA:0x00c0021b OBJ:4294967295 SCN:0x0000.009598ca SEQ:1 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 120 spc: 6104 flg: 0x0022 seq: 0x01bf rec: 0x0c
xid: 0x0009.01a.00005b60
ktubu redo: slt: 26 rci: 11 opc: 11.1 objn: 87535 objd: 87535 tsn: 5
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: 0x00c0021b.01bf.0b
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 0 ckix: 0
ncol: 2 nnew: 1 size: 3
col 1: [] 63 63 63 63 63 63
CHANGE #2 TYP:0 CLS:1 AFN:5 DBA:0x0140313f OBJ:87535 SCN:0x0000.009598ca SEQ:1 OP:11.5 ENC:0 RBL:0
KTB Redo
op: 0x02 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: C uba: 0x00c0021b.01bf.0c
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 1(0x1) flag: 0x2c lock: 1 ckix: 0
ncol: 2 nnew: 1 size: -3
col 1: [] 62 62 62
REDO RECORD - Thread:1 RBA: 0x000009.000002ee.0010 LEN: 0x00d0 VLD: 0x05
SCN: 0x0000.009598d6 SUBSCN: 1 06/12/2019 16:39:59
(LWN RBA: 0x000009.000002ee.0010 LEN: 0001 NST: 0001 SCN: 0x0000.009598d5)
CHANGE #1 TYP:0 CLS:33 AFN:3 DBA:0x00c00100 OBJ:4294967295 SCN:0x0000.009598ca SEQ:1 OP:5.4 ENC:0 RBL:0
ktucm redo: slt: 0x001a sqn: 0x00005b60 srt: 0 sta: 9 flg: 0x2 ktucf redo: uba: 0x00c0021b.01bf.0c ext: 2 spc: 5982 fbi: 0
CHANGE #2 MEDIA RECOVERY MARKER SCN:0x0000.00000000 SEQ:0 OP:24.4 ENC:0 redo log中以行修改记录
在IMU下
SYS@ orcl >alter system set "_in_memory_undo"=true;
SYS@ orcl >show parameter in_memory_undo NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
_in_memory_undo boolean TRUE
SYS@ orcl >shutdown immediate;
SYS@ orcl >startup
update test.redo_test set name='ccccc' where id=1;
update test.redo_test set name='ddddd' where id=2;
REDO RECORD - Thread:1 RBA: 0x00000b.00000002.0010 LEN: 0x0234 VLD: 0x05
SCN: 0x0000.00959bad SUBSCN: 1 06/12/2019 16:54:11
(LWN RBA: 0x00000b.00000002.0010 LEN: 0002 NST: 0001 SCN: 0x0000.00959baa)
CHANGE #1 TYP:0 CLS:29 AFN:3 DBA:0x00c000e0 OBJ:4294967295 SCN:0x0000.00959aae SEQ:1 OP:5.2 ENC:0 RBL:0
ktudh redo: slt: 0x001d sqn: 0x0000455c flg: 0x0012 siz: 184 fbi: 0
uba: 0x00c0388d.0246.0d pxid: 0x0000.000.00000000
CHANGE #2 TYP:0 CLS:30 AFN:3 DBA:0x00c0388d OBJ:4294967295 SCN:0x0000.00959a81 SEQ:1 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 184 spc: 5038 flg: 0x0012 seq: 0x0246 rec: 0x0d
xid: 0x0007.01d.0000455c
ktubl redo: slt: 29 rci: 0 opc: 11.1 [objn: 87535 objd: 87535 tsn: 5]
Undo type: Regular undo Begin trans Last buffer split: No
Temp Object: No
Tablespace Undo: No
0x00000000 prev ctl uba: 0x00c0388d.0246.0c
prev ctl max cmt scn: 0x0000.00959429 prev tx cmt scn: 0x0000.0095951a
txn start scn: 0xffff.ffffffff logon user: 0 prev brb: 12597387 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.003.0000202f uba: 0x00c028ae.01ae.0b
flg: C--- lkc: 0 scn: 0x0000.00959716
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 0 ckix: 0
ncol: 2 nnew: 1 size: -2
col 1: [] 61 61 61
CHANGE #3 TYP:2 CLS:1 AFN:5 DBA:0x0140313f OBJ:87535 SCN:0x0000.009598d6 SEQ:1 OP:11.5 ENC:0 RBL:0
KTB Redo
op: 0x11 ver: 0x01
compat bit: 4 (post-11) padding: 1
op: F xid: 0x0007.01d.0000455c uba: 0x00c0388d.0246.0d
Block cleanout record, scn: 0x0000.00959bad ver: 0x01 opt: 0x02, entries follow...
itli: 1 flg: 2 scn: 0x0000.009598d6
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0x00000000 bdba: 0x0140313f hdba: 0x0140313a
itli: 2 ispac: 0 maxfr: 4858
tabn: 0 slot: 0(0x0) flag: 0x2c lock: 2 ckix: 0
ncol: 2 nnew: 1 size: 2
col 1: [] 63 63 63 63 63
---这里分析redo log,还是在非imu下的redo 格式,没有达到想要的目的
在IMU模式下的update的redo,
一条记日志==》6个CHANGE VECTOR
CHANGE #1 ==>OP:11.5 -->UPDATE
CHANGE #2 ==>OP:5.2 -->开始一个事务
CHANGE #3 ==>OP:11.5 —>UPDATE
CHANGE #4 ==>OP:5.4 --->COMMIT
CHANGE #5 ==>OP:5.1 --->UNDO
CHANGE #6 ==>OP:5.1 --->UNDO
非IMU
产生一条REDO RECORD的步骤
1、获取redo copy Latch
2、获取redo allocate Latch
3、申请到LOG BUFFER空间
4、释放redo allocate Latch
5、生产日志(从buffer cache copy 修改前的值。从PGA copy 修改后的值),产生日志头
6、释放redo copy Latch
SYS@ orcl >select latch#,name from v$latch where name like '%redo%';
LATCH# NAME
---------- ----------------------------------------------------------------
168 redo on-disk SCN
169 ping redo on-disk SCN
207 redo writing
208 redo copy
209 redo allocation
210 real redo SCN
212 readredo stats and histogram
238 readable standby metadata redo cache
544 KFR redo allocation latch 9 rows selected.
IMU--->把多条日志条目合并成一条,减少LATCH
多出一个IMU LATCH
附录:op操作代码
格式:layer: opcode
LAYER的含义:
4 — Block Cleanout
5 — Transaction Management
10 — 索引操作
11 — 行操作
13 — 段[url=]管理[/url]
14 — Extent 管理
17 — 表空间管理
18 — Block Image (Hot Backups)
19 — Direct Loader
20 — Compatibility segment
22 — 本地管理表空间
23 — Block Writes
24 — DDL语句
Layer 1 : Transaction Control - KCOCOTCT
Opcode 1 : KTZFMT
Opcode 2 : KTZRDH
Opcode 3 : KTZARC
Opcode 4 : KTZREP
Layer 2 : Transaction Read - KCOCOTRD
Layer 3 : Transaction Update - KCOCOTUP
Layer 4 : Transaction Block - KCOCOTBK [ktbcts.h]
Opcode 1 : Block Cleanout
Opcode 2 : Physical Cleanout
Opcode 3 : Single Array Change
Opcode 4 : Multiple Changes to an Array
Opcode 5 : Format Block
Layer 5 : Transaction Undo - KCOCOTUN [ktucts.h]
Opcode 1 : Undo block or undo segment header - KTURDB
Opcode 2 : Update rollback segment header - KTURDH
Opcode 3 : Rollout a transaction begin
Opcode 4 : Commit transaction (transaction table update)
- no undo record
Opcode 5 : Create rollback segment (format) - no undo record
Opcode 6 : Rollback record index in an undo block - KTUIRB
Opcode 7 : Begin transaction (transaction table update)
Opcode 8 : Mark transaction as dead
Opcode 9 : Undo routine to rollback the extend of a rollback segment
Opcode 10 :Redo to perform the rollback of extend of rollback segment
to the segment header.
Opcode 11 :Rollback DBA in transaction table entry - KTUBRB
Opcode 12 :Change transaction state (in transaction table entry)
Opcode 13 :Convert rollback segment format (V6 -> V7)
Opcode 14 :Change extent allocation parameters in a rollback segment
Opcode 15 :
Opcode 16 :
Opcode 17 :
Opcode 18 :
Opcode 19 : Transaction start audit log record
Opcode 20 : Transaction continue audit log record
Opcode 24 : Kernel Transaction Undo Relog CHanGe - KTURLGU
Layer 6 : Control File - KCOCODCF [tbs.h]
Layer 10 : INDEX - KCOCODIX [kdi.h]
Opcode 1 : load index block (Loader with direct mode)
Opcode 2 : Insert leaf row
Opcode 3 : Purge leaf row
Opcode 4 : Mark leaf row deleted
Opcode 5 : Restore leaf row (clear leaf delete flags)
Opcode 6 : Lock index block
Opcode 7 : Unlock index block
Opcode 8 : Initialize new leaf block
Opcode 9 : Apply Itl Redo
Opcode 10 :Set leaf block next link
Opcode 11 :Set leaf block previous link
Opcode 12 :Init root block after split
Opcode 13 :Make leaf block empty
Opcode 14 :Restore block before image
Opcode 15 :Branch block row insert
Opcode 16 :Branch block row purge
Opcode 17 :Initialize new branch block
Opcode 18 :Update keydata in row
Opcode 19 :Clear row’s split flag
Opcode 20 :Set row’s split flag
Opcode 21 :General undo above the cache (undo)
Opcode 22 :Undo operation on leaf key above the cache (undo)
Opcode 23 :Restore block to b-tree
Opcode 24 :Shrink ITL (transaction entries)
Opcode 25 :Format root block redo
Opcode 26 :Undo of format root block (undo)
Opcode 27 :Redo for undo of format root block
Opcode 28 :Undo for migrating block
Opcode 29 :Redo for migrating block
Opcode 30 :IOT leaf block nonkey update
Opcode 31 :Cirect load root redo
Opcode 32 :Combine operation for insert and restore rows
Layer 11 : Row Access - KCOCODRW [kdocts.h]
Opcode 1 : Interpret Undo Record (Undo)
Opcode 2 : Insert Row Piece
Opcode 3 : Drop Row Piece
Opcode 4 : Lock Row Piece
Opcode 5 : Update Row Piece
Opcode 6 : Overwrite Row Piece
Opcode 7 : Manipulate First Column (add or delete the 1rst column)
Opcode 8 : Change Forwarding address
Opcode 9 : Change the Cluster Key Index
Opcode 10 :Set Key Links (change the forward & backward key links
on a cluster key)
Opcode 11 :Quick Multi-Insert (ex: insert as select …)
Opcode 12 :Quick Multi-Delete
Opcode 13 :Toggle Block Header flags
Layer 12 : Cluster - KCOCODCL [?]
Layer 13 : Transaction Segment - KCOCOTSG [ktscts.h]
Opcode 1 : Data segment format
Opcode 2 : Merge
Opcode 3 : Set link in block
Opcode 4 : Not used
Opcode 5 : New block (affects segment header)
Opcode 6 : Format block (affects data block)
Opcode 7 : Record link
Opcode 8 : Undo free list (undo)
Opcode 9 : Redo free list head (called as part of undo)
Opcode 9 : Format free list block (freelist group)
Opcode 11 :Format new blocks in free list
Opcode 12 :free list clear
Opcode 13 :free list restore (back) (undo of opcode 12)
Layer 14 : Transaction Extent - KCOCOTEX [kte.h]
Opcode 1 : Add extent to segment
Opcode 2 : Unlock Segment Header
Opcode 3 : Extent DEaLlocation (DEL)
Opcode 4 : Undo to Add extent operation (see opcode 1)
Opcode 5 : Extent Incarnation number increment
Opcode 6 : Lock segment Header
Opcode 7 : Undo to rollback extent deallocation (see opcode 3)
Opcode 8 : Apply Position Update (truncate)
Opcode 9 : Link blocks to Freelist
Opcode 10 :Unlink blocks from Freelist
Opcode 11 :Undo to Apply Position Update (see opcode 8)
Opcode 12 :Convert segment header to 6.2.x type
Layer 15 : Table Space - KCOCOTTS [ktt.h]
Opcode 1 : Format deferred rollback segment header
Opcode 2 : Add deferred rollback record
Opcode 3 : Move to next block
Opcode 4 : Point to next deferred rollback record
Layer 16 : Row Cache - KCOCOQRC
Layer 17 : Recovery (REDO) - KCOCORCV [kcv.h]
Opcode 1 : End Hot Backup : This operation clears the hot backup
in-progress flags in the indicated list of files
Opcode 2 : Enable Thread : This operation creates a redo record
signalling that a thread has been enabled
Opcode 3 : Crash Recovery Marker
Opcode 4 : Resizeable datafiles
Opcode 5 : Tablespace ONline
Opcode 6 : Tablespace OFFline
Opcode 7 : Tablespace ReaD Write
Opcode 8 : Tablespace ReaD Only
Opcode 9 : ADDing datafiles to database
Opcode 10 : Tablespace DRoP
Opcode 11 : Tablespace PitR
Layer 18 : Hot Backup Log Blocks - KCOCOHLB [kcb.h]
Opcode 1 : Log block image
Opcode 2 : Recovery testing
Layer 19 : Direct Loader Log Blocks - KCOCODLB [kcbl.h]
Opcode 1 : Direct block logging
Opcode 2 : Invalidate range
Opcode 3 : Direct block relogging
Opcode 4 : Invalidate range relogging
Layer 20 : Compatibility Segment operations - KCOCOKCK [kck.h]
Opcode 1 : Format compatibility segment - KCKFCS
Opcode 2 : Update compatibility segment - KCKUCS
Layer 21 : LOB segment operations - KCOCOLFS [kdl2.h]
Opcode 1 : Write data into ILOB data block - KDLOPWRI
Layer 22 : Tablespace bitmapped file operations - KCOCOTBF [ktfb.h]
Opcode 1 : format space header - KTFBHFO
Opcode 2 : space header generic redo - KTFBHREDO
Opcode 3 : space header undo - KTFBHUNDO
Opcode 4 : space bitmap block format - KTFBBFO
Opcode 5 : bitmap block generic redo - KTFBBREDO
Layer 23 : write behind logging of blocks - KCOCOLWR [kcbb.h]
Opcode 1 : Dummy block written callback - KCBBLWR
Layer 24 : Logminer related (DDL or OBJV# redo) - KCOCOKRV [krv.h]
Opcode : common portion of the ddl - KRVDDL
Opcode : direct load redo - KRVDLR
Opcode : lob related info - KRVLOB
Opcode : misc info - KRVMISC
Opcode : user info - KRVUSER 还有begin backup时是18.1
end backup 是17.1
nologging操作是19.2 并注明是invld
8 redo log内部结构分析(IMU/非IMU)--update示例的更多相关文章
- 非IMU模式下DML语句产生的REDO日志内容格式解读
实验内容:非IMU模式下DML语句产生的REDO日志内容格式解读 最详细的解读是UPDATE的. 实验环境准备 11G中默认是开启IMU特性的,做此实验需要关闭此特性. alter system se ...
- 07 oracle 非归档模式 inactive/active/current redo log损坏的恢复
在非归档模式下缺失Redo Log后的恢复 将之前的归档模式修改为非归档 SQL> shutdown immediate; SQL> startup mount SQL> alter ...
- Oracle Redo Log 机制 小结(转载)
Oracle 的Redo 机制DB的一个重要机制,理解这个机制对DBA来说也是非常重要,之前的Blog里也林林散散的写了一些,前些日子看老白日记里也有说明,所以结合老白日记里的内容,对oracle 的 ...
- 详细分析MySQL事务日志(redo log和undo log)
innodb事务日志包括redo log和undo log.redo log是重做日志,提供前滚操作,undo log是回滚日志,提供回滚操作. undo log不是redo log的逆向过程,其实它 ...
- 详细分析MySQL事务日志(redo log和undo log) 表明了为何mysql不会丢数据
innodb事务日志包括redo log和undo log.redo log是重做日志,提供前滚操作,undo log是回滚日志,提供回滚操作. undo log不是redo log的逆向过程,其实它 ...
- MySQL · 引擎特性 · InnoDB redo log漫游(转)
前言 InnoDB 有两块非常重要的日志,一个是undo log,另外一个是redo log,前者用来保证事务的原子性以及InnoDB的MVCC,后者用来保证事务的持久性. 和大多数关系型数据库一样, ...
- 深入理解MySQL系列之redo log、undo log和binlog
事务的实现 redo log保证事务的持久性,undo log用来帮助事务回滚及MVCC的功能. InnoDB存储引擎体系结构 redo log Write Ahead Log策略 事务提交时,先写重 ...
- MySQL日志系统bin log、redo log和undo log
MySQL日志系统bin log.redo log和undo log 今人不见古时月,今月曾经照古人. 简介:日志是MySQL数据库的重要组成部分,记录着数据库运行期间各种状态信息,主要包括错误日 ...
- 【REDO】删除REDO LOG重做日志组后需要手工删除对应的日志文件(转)
为保证重新创建的日志组成员可以成功创建,我们在删除日志组后需要手工删除对应的日志文件. 1.查看数据库当前REDO LOG日志相关信息1)查看日志组信息sys@ora10g> select * ...
随机推荐
- init, telinit - 进程处理初始化
总览 /sbin/init [ -a ] [ -s ] [ -b ] [ -z xxx ] [ 0123456Ss ] /sbin/telinit [ -t 秒 ] [ 0123456sSQqabcU ...
- owncloud 安装
假定lamp已安装完成. 1 安装owncloud 使用curl命令下载其发行版密钥(key),并使用add命令将其与apt-key实用程序一起导入: curl https://download.ow ...
- (转) Windows下MySQL免安装版的下载与配置
本人在尊重原著的前提下.针对在实践中所遇到的问题加以整理和完善,如有不足之处,还请各位大神指点江山O(∩_∩)O~ 主要是因为平时自己学习时候会用到.及免安装版本的方便.对于个人开发者挺实用的! 安装 ...
- 转(HBuilder 打包流程)
1.运行HBuilder---百度搜索HBuilder,官网下载安装包,解压,运行HBuilder.exe.注册账号,并登陆 2.新建app---在左边右键,选择新建APP,或者,点击中间的新建app ...
- Vue基础第四章 - v-bind指令
1.v-bind指令介绍 在前端开发过程中最常做的事莫过于class类名的绑定与style内联样式的修改,Vue中使用v-bind指令来实现这两个需求,在第二章中给出过简单的示例,下面我们来看一下v- ...
- mac下phpize编译提示Cannot find autoconf解决办法
mac下phpize编译如下报错: /usr/bin/phpizeConfiguring for:PHP Api Version: 20121113Zend Module Api No: 201212 ...
- [转]CSS自动换行后缩进
原文 https://blog.csdn.net/u011974797/article/details/71439794 例如: ●这是第一行太长了超出 显示到第二行 想实现的效果: ●这是第一行太长 ...
- Comet OJ - Contest #14题解
Contest14的本质:区间覆盖+Tarjan( A 把距离公式两边平方即可 注意要long long code #include <algorithm> #include <io ...
- case 函数两种格式
1.简单case函数 CASE sex WHEN '0' THEN '男' WHEN '1' THEN '女' ELSE '其他' END 2.case搜索函数 CASE WHEN sex = '0' ...
- 2018山东省赛 E Sequence ( 思维 )
题目链接 题意 : 给出一个排列,让你删除一个数,使得删除后整个序列的 Good 数数量最多.Good 数的定义为 若 Ai 为 Good 则存在 Aj < Ai ( j < i ) 分析 ...