当前位置:Gxlcms > mysql > 搭建Oracle到Oracle的GoldenGate单向复制测试环境

搭建Oracle到Oracle的GoldenGate单向复制测试环境

时间:2021-07-01 10:21:17 帮助过:16人阅读

搭建Oracle 到Oracle 的GoldenGate 单向复制测试环境,在Source端,配置一个管理进程, 添加一个Extract进程,添加一个本地队列路

测试环境:

OSRedHat 5.4 64bit

DB: Oracle 11.2.0.3 64bit

示例采用GoldenGate典型的配置:


GoldenGate单向表DML同步

Oracle GoldenGate 系列:Extract 进程的恢复原理

Oracle GoldenGate安装配置

Oracle goldengate的OGG-01004 OGG-1296错误

Oracle GoldenGate快速入门教程:基本概念和配置

搭建一个Oracle到Oracle的GoldenGate双向复制环境

[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

[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

gg2:/home/oracle> source/home/oracle/.bash_profile

gg1:/u01/ggate> 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

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>

GoldenGate通过抓取源端数据库重做日志进行分析,将获取的数据应用到目标端,实现数据同步。因此,源数据库需要必须处于归档模式,,并启用附加日志和强制日志。

2.1 归档模式、附加日志、强制日志

--查看

SQL> select log_mode,supplemental_log_data_min,force_logging from v$database;

LOG_MODE SUPPLEME FOR

------------ -------- ---

ARCHIVELOG NO NO

--修改

SQL>shutdown immediate

SQL>startup mount

SQL>alter database archivelog;

SQL>alter database open;

SQL>alterdatabase force logging;

SQL>alterdatabase add supplemental log data;

如果是

人气教程排行