问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

如何在11gR2 RAC上配置GoldenGate

发布网友 发布时间:2022-04-21 16:08

我来回答

2个回答

热心网友 时间:2022-04-09 14:00

简单谈谈如何解决上面这个场景的问题。
  第一阶段:下载OGG(可以参考之前的单节点的复制例子,不再赘述)
OGG的下载地址
  第二阶段:OGG的安装
  1)登录源端的RAC系统中的任一个节点,并在ACFS上建立一个供OGG使用的共享目录,比如叫/cloudfs/goldengate
  2)解压OGG的安装包到/cloudfs/goldengate目录
  3) 设置好OGG工作的环境变量,比如
  export LIBRARY_PATH=/cloudfs/goldengate:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
  4)启动ggsci并创建目录,然后进行必要的设置,启动manager
  $ ggsci

GGSCI > create subdirs

(optional, support for DDL/Sequence)
Create and edit the parameter file for GLOBALS:

GGSCI > EDIT PARAMS ./GLOBALS
Add this line to GLOBALS parameter file:

GGSCHEMA ggs

NOTE: 'ggs' is the example OGG user and will be used in the rest of this document.

GGSCI > EDIT PARAMS mgr

Add the following lines to Manager parameter file:

PORT 7809
AUTOSTART ER *
AUTORESTART ER *

GGSCI > START mgr
  5)在目标端重复上面的步骤1-4,注意目录名的使用,我们在目标端使用/mycloudfs/goldengate以示区分。
  第三阶段:源和目标RAC数据库准备步骤

1) Create OGG user 'ggs' on both the source and target database, connect to database using SQL*Plus as SYSDBA:

SQL> CREATE USER ggs IDENTIFIED BY ggs;
SQL> GRANT CONNECT,RESOURCE,DBA TO ggs;

2) (optional, add Oracle sequence replication support) On both source and target database, go to OGG directory and run this SQL, enter OGG user 'ggs' as prompted:
SQL> @sequence.sql

3) Enable supplemental logging on source ODA database:
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (UNIQUE) COLUMNS;
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;
SQL> ALTER SYSTEM SWITCH LOGFILE;

(Optional) Add Oracle DDL replication support
4) On the source system, go to OGG directory, connect to database using SQL*Plus as SYSDBA.

SQL> GRANT EXECUTE ON utl_file TO ggs;

5 On the source system, run the following script, provide OGG user 'ggs' as prompted.

SQL> @marker_setup.sql
SQL> @ddl_setup.sql

NOTE: enter 'INITIALSETUP' when prompted for the mode of installation.

SQL> @role_setup.sql
SQL> @ddl_enable.sql
SQL> @ddl_pin ggs

NOTE: 'ggs' here is the OGG user.
  第四阶段:配置源端的extract group

1) Issue the following command to log on to the database.
GGSCI > DBLOGIN USERID ggs, PASSWORD ggs

2) Create a primary Extract group 'myext':

GGSCI > ADD EXTRACT myext, TRANLOG, BEGIN NOW, THREADS 2
NOTE: THREADS value is the number of your RAC instances.

3) Create a local trail. The primary Extract writes to this trail, and the data-pump Extract reads it.

GGSCI > ADD EXTTRAIL /cloudfs/goldengate/dirdat/et, EXTRACT myext
NOTE: 'et' is the example trail identifier for Extract 'myext'.

4) Create and edit the parameter file for Extract 'myext':

GGSCI > EDIT PARAMS myext
Add following lines to this parameter file:

EXTRACT myext
SETENV (ORACLE_HOME = "/u01/app/oracle/proct/11.2.0/dbhome_1")
USERID ggs@ggdb, PASSWORD ggs
TRANLOGOPTIONS DBLOGREADER
THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 20000
EXTTRAIL /cloudfs/goldengate/dirdat/et
DYNAMICRESOLUTION
DDL INCLUDE ALL
TABLE hr.*;

NOTE 1: make sure the SQL*Net connection string 'ggdb' works.
NOTE 2: 'hr' is the example schema which will be synchronized to the target system.
  第五阶段:在源端配置data pump extract group

1)Create a data pump group 'mypump':
GGSCI > ADD EXTRACT mypump, EXTTRAILSOURCE /cloudfs/goldengate/dirdat/et, BEGIN now

2) Specify a remote trail that will be created on the target system.

GGSCI > ADD RMTTRAIL /mycloudfs/goldengate/dirdat/rt, EXTRACT mypump
NOTE: 'rt' is the example trail identifier for Extract 'mypump', and use the target OGG directory '/mycloudfs/goldengate' here.

3) Create and edit the parameter file for Extract 'mypump':
GGSCI > EDIT PARAMS mypump

Add following lines to this parameter file:

EXTRACT mypump
RMTHOST rac12box-scan, MGRPORT 7809
RMTTRAIL /mycloudfs/goldengate/dirdat/rt
PASSTHRU
TABLE hr.*;

NOTE: RMTHOST is the target host. If you also prefer to set up HA on the target system, specify the VIP for your target system as RMTHOST,
otherwise just use the IP address/hostname of your target system.

4) Start Extract 'myext' and 'mypump':

GGSCI > START myext
GGSCI > START mypump

5) Check the status of OGG processes:
GGSCI > info all
  第六阶段:在目标端配置Replicat group

1) Create a Replicat group 'rept', which reads trails from Extract 'mypump':

GGSCI > ADD REPLICAT rept, EXTTRAIL /mycloudfs/goldengate/dirdat/rt, nodbcheckpoint

2) Create and edit the parameter file for Replicat 'rept':

GGSCI > EDIT PARAMS rept
Add following lines to this parameter file, assume the same ORACLE_HOME and target database 'ggdb' as in source ODA environment:

REPLICAT rept
SETENV (ORACLE_HOME = "/u01/app/oracle/proct/11.2.0/dbhome_1")
USERID ggs@ggdb,PASSWORD ggs
ASSUMETARGETDEFS
HANDLECOLLISIONS
REPERROR (DEFAULT, DISCARD)
DDLERROR DEFAULT DISCARD
DDLOPTIONS REPORT
DISCARDFILE /mycloudfs/goldengate/repsz.dsc,append,megabytes 100
MAP hr.*, TARGET hr.*;

NOTE: make sure the SQL*Net connection string 'ggdb' works.

3) Start Replicat 'rept':

GGSCI > START rept

4) Check the status of OGG processes:
GGSCI > info all
  第七阶段:验证Goldengate功能
  1) Log on to source database as user 'hr', do some simple DDL and DML operations.
  2) Check the data change has been captured by Extract on source system:
  
  GGSCI > STATS myext
  GGSCI > STATS mypump
  
  3)Log on to target system as oracle user, check the status of Replicat 'rept':
  
  GGSCI > STATS rept
  
  4) Compare the output and make sure data change is synchronized.
  5)(optional, for further HA setup) Stop OGG on source system:
  
  GGSCI > STOP myext
  GGSCI > STOP mypump
  GGSCI > STOP mgr
  
  6)(optional, for further HA setup) Stop OGG on target system:
  
  GGSCI > STOP rept
  GGSCI > STOP mgr
  

热心网友 时间:2022-04-09 15:18

第三阶段:源和目标RAC数据库准备步骤 1) Create OGG user 'ggs' on both the source and target database, connect to database using SQL*Plus as SYSDBA: SQL> CREATE USER ggs IDENTIFIED BY ggs; SQL> GRANT CONNECT,RESOURCE,DBA TO ggs; 2)(optional, add Oracle sequence replication support) On both source and target database, go to OGG directory and run this SQL, enter OGG user 'ggs' as prompted: SQL> @sequence.sql 3) Enable supplemental logging on source ODA database: SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS; SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (UNIQUE) COLUMNS; SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS; SQL> ALTER SYSTEM SWITCH LOGFILE; (Optional) Add Oracle DDL replication support 4) On the source system, go to OGG directory, connect to database using SQL*Plus as SYSDBA. SQL> GRANT EXECUTE ON utl_file TO ggs; 5 On the source system, run the following script, provide OGG user 'ggs' as prompted. SQL> @marker_setup.sql SQL> @ddl_setup.sql NOTE: enter 'INITIALSETUP' when prompted for the mode of installation. SQL> @role_setup.sql SQL> @ddl_enable.sql SQL> @ddl_pin ggs NOTE: 'ggs' here is the OGG user.
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
便携式发电机十大名牌 冬天夜跑同时锻炼身体和意志的句子锦集 冬天的时候跑步可以达到46~60分钟 可是夏天了跑步25分钟左右就已经感觉... 孩子病毒性感冒咳嗽厉害怎么办 严重的病毒性感冒几天能好 宝宝六个月因为病毒性感冒而咳嗽有痰可每次咳嗽出来的痰他吐不出来怎 ... ios购买的app怎么退款 求助!书法高手!用什么书法来“魏亮”这二字最漂亮? 万事胜意,喜乐长安繁体 什么叫喜乐长安 Oracle GoldenGate PUMP_SO.prm和eora进程异常 goldengate mysql to oracle OGG-00146 求助 如何解决Oracle GoldenGate 没有主键的问题 oracle ogg怎么鬱atapump进程 GoldenGate进程失败后怎么跳过当前事务 怎么查看ogg队列里某张表做的那些操作 oracle数据库想迁移到mysql上 有什么方法或者工具吗 高铁票显示不可预订是不是售完了?还是要买现票 如何确定ogg 源端的抓取trail文件是否可以删除 网上怎么购买烟花爆竹 goldengate extract data files过多文件占用大量硬盘空间怎么办 我在去哪里买的火车票自动扣钱,但微信和银行卡都没有扣钱,是在 oracle的数据导入到mysql中,遇到一个时间转换问题 预约购高铁票能不能买到票啊 404 Not Found 高铁票提前一个星期可以买吗? 404 Not Found 高铁票网上没有了窗口还可以买到吗? 网上预约高铁票一定能买到吗? 404 Not Found mysql数据库连接不上怎么回事? 哪位大虾 能告诉俺一些实用的DOS命令啊 生化危机4ogg.dat文件打不开,说是不是标准的媒体文件? 怎么把文件名后缀改为jpg格式呢? 文件后缀 dir 和 DAT 格式的文件能用什么软件打开 新鲜菱角怎么剥壳 菱角怎么剥壳最简单? 鲜菱角怎么去皮 菱角肉怎么剥出来 如何才能快速剥菱角? 最简单的开菱角方法 请问生的菱角怎么剥壳 野生菱角怎么去壳 404 Not Found 怎样更换针式打印机色带? 针式打印机怎么换色带 惠普针式打印机怎么换色带 针式打印机怎么换色带?? 针式打印机缺色怎么办 针式打印机怎么换色带安装色带夹