OGG源端和目标端增加复制表以及重新同步的练习

1 篇文章 0 订阅
实验在源端添加scott.addtable1表,然后在目标端复制表结构 图片

在目标端,在目标端执行SQL后,停止两端的进程,然后在修改两端的配置文件
下图为源端的extract进程 
图片
下图为目标端的replicat进程
图片 




然后重启两端个进程,然后在源端 
GGSCI>dblogin userid ogg,password ogg
GGSCI>info trandata scott.addtable1
然后测试是否可以同步,
然后发现addtable1里面是有数据的,所以顺便再做下重新同步表的操作,首先将ext *和rep *进程关闭,然后
在源端
SQL>   select dbms_flashback.get_system_change_number current_scn from dual;

CURRENT_SCN
-----------
    1045402
接着将表导出
exp system/system direct=y buffer=64000 flashback_scn=1044036 constraints=n grants=n triggers=n file=/home/oracle/new_tab.dmp log=/home/oracle/new_tab.log tables=scott.addtable1
[oracle@ora11ogg1 ~]$ scp new_tab.dmp root@192.168.56.122:/home/oracle/
The authenticity of host '192.168.56.122 (192.168.56.122)' can't be established.
RSA key fingerprint is b9:02:01:fb:3b:7b:98:cf:ff:8e:46:12:50:b5:d9:80.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.56.122' (RSA) to the list of known hosts.
root@192.168.56.122's password: 
new_tab.dmp                                                      

imp system/system file=/home/oracle/new_tab.dmp log=/home/oracle/new_tab.log fromuser=scott touser=scott commit=y ignore=y buffer=100000

然后,再重新启动两边的进程。

#################################### #参考自GoldenGate企业级运维实战
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值