oracle ogg双活,oracle 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 

该参数加到主端和备端的extract 参数文件中。

例如:

USERID ogg, PASSWORD XXXXXXX, ENCRYPTKEY default

TRANLOGOPTIONS EXCLUDEUSER ogg

理解这个问题的关键是搞清楚用户。这是配置双活的关键步骤。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值