Oracle Golden Gate 雙活複製避免迴圈複製參數

來源:互聯網
上載者:User

我簡單的簡紹一下goldengate的一些實用的、常用的參數。

一、雙向複製避免資料迴圈複製的參數

首先說明一下迴圈複製,官網上的描述:

In a bidirectional configuration, SQL change s that are replicated from one system to
another must be prevented from being replicat ed back to the first system. Otherwise, it
moves back and forth in an endless loop, as in this example:
1. A user application updates a row on system A.
2. Extract extracts the row on system A and sends it to system B.
3. Replicat updates the row on system B.
4. Extract extracts the row on system B and sends it back to system A.
5. The row is applied on system A (for the second time).
6. This loop continues endlessly.
To prevent data loopback, you may need to provide instructions that:
● prevent the capture of SQL operations that are generated by Replicat, but enable the
capture of SQL operations that are generated by business applications if they contain
objects that are specified in the Extract parameter file.
● identify local Replicat transactions, in or der for the Extract process to ignore them.


意譯:主端對資料的修改,被應用到了備端。但是備端在執行這個主端傳遞過來的資料改變時,又被備端的extract 進程
      撲獲到,並且又反給主端。然後主端又給備端,這樣形成了迴圈複製,會一直迴圈下去。
    
      一定要理解原因:主端執行修改資料的使用者是和業務應用對應的使用者(不是ogg使用者),但是備端在執行主端傳遞過來的
      對資料修改的使用者是ogg複製使用者,也就是我前面配置的ogg 使用者。(ogg schema)而實際上這個使用者發起的對資料的修改
      只是對主端的應用,只是複製主端的事務。而不能再被作為對資料的修改,返回給主端。所以在參數檔案中加入參數
      過濾掉這個使用者發起的對資料的修改。
   
以oralce  資料庫為例,說明參數如下:

Do either of the following to  specify the Replicat database us er. All transactions generated
by this user will be excluded from being captured. This information is available to Extract
in the transaction record.
● Identify the Replicat database user by name with the following parameter statement
in the Extract parameter file.
TRANLOGOPTIONS EXCLUDEUSER <user name>

該參數加到主端和備端的extract 參數檔案中。

例如:
    
USERID ogg, PASSWORD AACAAAAAAAAAAADAHBLDCCIIOIRFNEPB, ENCRYPTKEY default
TRANLOGOPTIONS EXCLUDEUSER ogg 

理解這個問題的關鍵是搞清楚使用者。這是配置雙活的關鍵步驟。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.