關於SMON每三秒從IMU中拷貝修改前值到BUFFER CACHE中構建一個CR塊操作的驗證

來源:互聯網
上載者:User


借老郭的,說明一下:

第一步:將更改的資料存放到PGA 
第二步:將BUFFER CACHE中舊資料拷貝到共用池的私人IMU buffer
第三步:將PGA中修改後的資料存放到private redo
第四步:修改buffre cache中的資料
註:我實驗了做到這一步,執行update語句後迅速(3秒內)的進行DUMP REDO LOGFILE的操作,從DUMP出的檔案中,是找不到此事務的REDO日誌條目。
做提交操作後:
第五步:從IMU中拷貝修改前值到BUFFER CACHE中構建一個CR塊-----
第六步:第四步修改修改buffre cache中的資料產生的redo日誌寫入redo log file
第七步:第五步操作構造CR塊,產生的redo日誌寫入 redo log file
第八步:由lgwr寫出log buffer到redo log file

第九步:dbwr 將髒資料寫入data file

實驗步驟:

12:12:04 BYS@ bys3>select a.group#,a.sequence#,a.archived,a.status,b.type,b.member from v$log a,v$logfile b where a.group#=b.group#;
    GROUP#  SEQUENCE# ARC STATUS           TYPE    MEMBER
---------- ---------- --- ---------------- ------- ------------------------------
         1        334 NO  CURRENT          ONLINE  /u01/oradata/bys3/redo01.log
         2        332 YES ACTIVE           ONLINE  /u01/oradata/bys3/redo02.log
         3        333 YES ACTIVE           ONLINE  /u01/oradata/bys3/redo03.log
Elapsed: 00:00:00.03
12:12:09 BYS@ bys3>select * from dept;
    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        40 OPERATIONS     BOSTON
        11 database       database
        22 dataoracle     sh
Elapsed: 00:00:00.01
12:12:24 BYS@ bys3>update dept set dname='mysql' where deptno=11;
1 row updated.
Elapsed: 00:00:00.01


執行完此操作迅速(3秒內)的進行DUMP REDO LOGFILE的操作,從DUMP出的檔案中,是找不到此事務的REDO日誌條目。有興趣的可以做一下試試。


如果過3秒後,再執行DUMP REDO LOGFILE的操作,從DUMP出的檔案中,可以看到此次操作的資訊:--怎麼感覺這樣不太嚴謹


REDO RECORD - Thread:1 RBA: 0x00014e.0000000e.0010 LEN: 0x01bc VLD: 0x0d

,。
(LWN RBA: 0x00014e.0000000e.0010 LEN: 0003 NST: 0001 SCN: 0x0000.00736971)
CHANGE #1 TYP:0 CLS:1 AFN:4 DBA:0x010000fd OBJ:22327 SCN:0x0000.00736959 SEQ:2 OP:11.5 ENC:0 RBL:0
KTB Redo
op: 0x01  ver: 0x01  
compat bit: 4 (post-11) padding: 1
op: F  xid:  0x0007.020.00000f43    uba: 0x00c02059.02c8.0c
KDO Op code: URP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x010000fd  hdba: 0x010000fa
itli: 2  ispac: 0  maxfr: 4858
tabn: 0 slot: 8(0x8) flag: 0x2c lock: 2 ckix: 0
ncol: 3 nnew: 1 size: -3
col  1: [ 5]  6d 79 73 71 6c
CHANGE #2 TYP:0 CLS:29 AFN:3 DBA:0x00c000e0 OBJ:4294967295 SCN:0x0000.0073692e SEQ:2 OP:5.2 ENC:0 RBL:0
ktudh redo: slt: 0x0020 sqn: 0x00000f43 flg: 0x0012 siz: 164 fbi: 0
            uba: 0x00c02059.02c8.0c    pxid:  0x0000.000.00000000
CHANGE #3 TYP:0 CLS:30 AFN:3 DBA:0x00c02059 OBJ:4294967295 SCN:0x0000.0073692e SEQ:3 OP:5.1 ENC:0 RBL:0
ktudb redo: siz: 164 spc: 6772 flg: 0x0012 seq: 0x02c8 rec: 0x0c
            xid:  0x0007.020.00000f43  
ktubl redo: slt: 32 rci: 0 opc: 11.1 [objn: 22327 objd: 22327 tsn: 4]
Undo type:  Regular undo        Begin trans    Last buffer split:  No
Temp Object:  No
Tablespace Undo:  No
             0x00000000  prev ctl uba: 0x00c02059.02c8.09
prev ctl max cmt scn:  0x0000.007365f2  prev tx cmt scn:  0x0000.00736612
txn start scn:  0x0000.007368a2  logon user: 32  prev brb: 12591190  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:  0x000a.002.00000f0c uba: 0x00c0175c.026f.01
                      flg: C---    lkc:  0     scn: 0x0000.0072a6f2
KDO Op code: URP row dependencies Disabled
  xtype: XA flags: 0x00000000  bdba: 0x010000fd  hdba: 0x010000fa
itli: 2  ispac: 0  maxfr: 4858
tabn: 0 slot: 8(0x8) flag: 0x2c lock: 0 ckix: 0
ncol: 3 nnew: 1 size: 3
col  1: [ 8]  64 61 74 61 62 61 73 65

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.