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

来源:互联网 发布:怎么上淘宝首页广告位 编辑:程序博客网 时间:2024/05/29 18:56
实验在源端添加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
原创粉丝点击