GoldenGate单向复制配置(支持DDL复制)

本文档详细介绍了如何配置Oracle GoldenGate进行单向复制,并支持DDL语句的复制。在源端,需要赋予ogg用户相应权限,修改全局配置文件,运行SQL脚本,调整extract和pump进程参数。在目标端,需修改replicat进程参数以处理DDL错误。通过这些步骤,可以确保源端的DDL操作在目标端得到正确执行。
摘要由CSDN通过智能技术生成

版本说明

                   Source               Target
Oracle             11.2.0.4.0           11.2.0.4.0
GoldenGate         12.2.0.1.1           12.2.0.1.1
OS                 CentOS 6.5           CentOS 6.5

不支持DDL验证

源端运行DDL语句

SQL> create table test(id number);

Table created.

目标端报错

[oracle@acarsorcl-ogg ogg]$ tail -n 500 ggserr.log

2016-07-18 15:45:25  INFO    OGG-06506  Oracle GoldenGate Delivery for Oracle, repa.prm:  Wildcard MAP resolved (entry skylink.*): map "SKYLINK"."TEST" target skylink."TEST".
2016-07-18 15:45:25  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, repa.prm:  Table SKYLINK.TEST does not exist.
2016-07-18 15:45:25  ERROR   OGG-00199  Oracle GoldenGate Delivery for Oracle, repa.prm:  Table skylink.TEST does not exist in target database.
2016-07-18 15:45:25  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, repa.prm:  PROCESS ABENDING.

配置OGG支持DDL

1、赋予ogg用户相应的权限,修改全局配置文件添加ggschema参数(源端操作)

SQL> conn / as sysdba
Connected.
SQL> 
SQL> 
SQL> grant execute on utl_file to ogg;

Grant succeeded.
GGSCI (acarsorcl-primary) 17> edit param ./GLOBALS
GGSCI (acarsorcl-primary) 1> view param ./GLOBALS

    ggschema ogg

2、运行相关sql脚本(源端操作)

[oracle@acarsorcl-primary ~]$ cd /u01/ogg

[oracle@acarsorcl-primary ogg]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jul 18 15:56:33 2016
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @marker_setup.sql
Marker setup script
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.
Enter Oracle GoldenGate schema name:ogg
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to OGG
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.

SQL> @ddl_setup.sql
Oracle GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Or
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值