OS: RedHat 5.4 64bit
DB: Oracle 11.2.0.3 64bit
示例采用GoldenGate典型的配置:
在Source端,配置一个管理进程, 添加一个Extract进程,添加一个本地队列路径,定义一个远端的接收队列路径。
在Target端,配置一个管理进程和添加一个Replicat进程,指定一个应用队列,即抽取进程定义的远端队列。
Oracle GoldenGate 系列:Extract 进程的恢复原理
Oracle goldengate的OGG-01004 OGG-1296错误
Oracle GoldenGate快速入门教程:基本概念和配置
搭建一个Oracle到Oracle的GoldenGate双向复制环境
一.安装GG 软件
1.1 OS 和 DB 版本[root@gg2 ~]# uname -a
Linux gg2 2.6.18-164.el5xen #1 SMP Tue Aug18 15:59:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@gg2 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4(Tikanga)
SQL> select * from v$version whererownum=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0 - 64bit Production
1.2 安装GG在source database 和 target database 都执行如下操作:
[root@gg2 ~]# su - oracle
gg2:/home/oracle> mkdir /u01/ggate
gg2:/home/oracle> cd /u01
gg2:/u01> ls
app ggate
fbo_ggs_Linux_x64_ora11g_64bit.tar OGG_WinUnix_Rel_Notes_11.1.1.1.0.pdf
fbo_ggs_Linux_x64_ora11g_64bit.zip README.txt
gg2:/u01> tar xvffbo_ggs_Linux_x64_ora11g_64bit.tar -C /u01/ggate
1.3 添加环境变量在/home/oracle/.bash_profile文件里添加如下内容:
export PATH=/u01/ggate:$PATH
exportLD_LIBRARY_PATH=/u01/ggate:$LD_LIBRARY_PATH
export GGATE=/u01/ggate
注意我这里的GG 和Oracle 使用的是相同的用户,所以把GG 的变量加上就可以了。加载刚刚设置的环境变量:
gg2:/home/oracle> source/home/oracle/.bash_profile
1.4 使用ggsci工具,创建必要的目录gg1:/u01/ggate> ggsci
--调用ggsci 工具
Oracle GoldenGate Command Interpreter forOracle
Version 11.1.1.1OGGCORE_11.1.1_PLATFORMS_110421.2040
Linux, x64, 64bit (optimized), Oracle 11gon Apr 21 2011 22:42:14
Copyright (C) 1995, 2011, Oracle and/or itsaffiliates. All rights reserved.
GGSCI (gg1) 1> create subdirs
--使用ggsci 工具创建目录
Creating subdirectories under currentdirectory /u01/ggate
Parameter files /u01/ggate/dirprm: created
Report files /u01/ggate/dirrpt: created
Checkpoint files /u01/ggate/dirchk: created
Process status files /u01/ggate/dirpcs: created
SQL script files /u01/ggate/dirsql: created
Database definitions files /u01/ggate/dirdef: created
Extract data files /u01/ggate/dirdat: created
Temporary files /u01/ggate/dirtmp: created
Veridata files /u01/ggate/dirver: created
Veridata Lock files /u01/ggate/dirver/lock: created
Veridata Out-Of-Sync files /u01/ggate/dirver/oos: created
Veridata Out-Of-Sync XML files/u01/ggate/dirver/oosxml: created
Veridata Parameter files /u01/ggate/dirver/params: created
Veridata Report files /u01/ggate/dirver/report: created
Veridata Status files /u01/ggate/dirver/status: created
Veridata Trace files /u01/ggate/dirver/trace: created
Stdout files /u01/ggate/dirout: created
GGSCI (gg1) 2>