OGG源端和目标端数据不一致的场景

@源端GGSCI (rhlinux) 3> view params ext_1extract ext_1userid ogg,password oggexttrail ./dirdat/e1...
摘要由CSDN通过智能技术生成

@源端
GGSCI (rhlinux) 3> view params ext_1


extract ext_1
userid ogg,password ogg
exttrail ./dirdat/e1
table scott.emp;
table scott.dept;
table scott.t;
table scott.tv;
table scott.t2;




GGSCI (rhlinux) 4> view params pump_1


extract pump_1
userid ogg ,password ogg
rmthost 192.168.73.134, mgrport 7811
rmttrail ./dirdat/p1
--passthru
table scott.emp;
table scott.t;
table scott.dept;
table scott.tv;
table scott.t2;






@目标端
GGSCI (ogg) 2> view params rep_1


replicat rep_1
userid ogg,password ogg
assumetargetdefs
discardfile /opt/ogg/discard/e1.log,append,megabytes 10
handlecollisions
map scott.emp , target scott.emp;
map scott.dept, target scott.dept;
map scott.t,target scott.t;
map scott.t2,target scott.t2;




scott.t是通过dba_users创建的,user_id是主键。
源端数据为:
SQL> select user_id from scott.t;


no rows selected


目标端数据为:
SQL> select user_id from scott.t;


   USER_ID
----------
         0
         5


1.源端增加数据,目标端发现相同主键数据。如果目标端有handlecollisions参数,不报错;否则报错


GGSCI (ogg) 3> stats rep_1,hourly


Sending STATS request to REPLICAT REP_1 ...


Start of Statistics at 2015-07-19 01:21:05.


Replicating from SCOTT.T to SCOTT.T:


*** Hourly statistics since 2015-07-19 01:00:00 ***
        Total inserts                                     38.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                  38.00
        Total insert collisions                            2.00  --有两条冲突的,未插入


End of Statistics.




2.源端更新数据,目标端数据主键相同,但其他字段不同,可以正常更新:
@源端
SQL> select username ,user_id from scott.t where user_id=0;


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值