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: [11]  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: [ 6]  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: [13]  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: [ 6]  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: [ 6]  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: [ 3]  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中以行修改记录
View Code

在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: [ 3]  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: [ 5]  63 63 63 63 63
View Code

---这里分析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
               5Transaction 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
View Code

 

posted @ 2019-06-13 10:04  春困秋乏夏打盹  阅读(848)  评论(0编辑  收藏  举报