实验在源端添加scott.addtable1表,然后在目标端复制表结构
![图片](https://i-blog.csdnimg.cn/blog_migrate/0846205ff85c58547e71679d68a84978.jpeg)
在目标端,在目标端执行SQL后,停止两端的进程,然后在修改两端的配置文件
下图为源端的extract进程
下图为源端的extract进程
![图片](https://i-blog.csdnimg.cn/blog_migrate/b5b0ac95d7f4dac366ec96069ea2f9a9.jpeg)
下图为目标端的replicat进程
![图片](https://i-blog.csdnimg.cn/blog_migrate/dccb183933b9b810a6278ce73ff2368b.jpeg)
然后重启两端个进程,然后在源端
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企业级运维实战