异构GoldenGate 12c 双向复制配置

时间:2022-12-22 23:43:06
1.配置window,添加checkpoint表(本文windows和linux互为source和target)
GGSCI (WIN-GM5PVS1CILH) 1> view param ./GLOBALS
ggschema ggs
checkpointtable ggs.chkpt GGSCI (WIN-GM5PVS1CILH) 2> dblogin userid ggs,password ggs
Successfully logged into database. GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 3> add checkpointtable No checkpoint table specified. Using GLOBALS specification (ggs.chkpt)... Successfully created checkpoint table ggs.chkpt. GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 4> #在mgr的参数文件中添加 ipadd
ACCESSRULE, PROG *, IPADDR 192.168.0.*, ALLOW 2.配置linux,运行相关的脚本,支持DDL的复制
[oracle@Oracle02 admin]$ cd /u01/app/oracle/product/ogg_src/
[oracle@Oracle02 ogg_src]$ sqlplus /nolog
SQL> conn /as sysdba
Connected.
SQL> GGSCI (Oracle02 as ggt@orcl) 31> view param ./GLOBALS
ggshcame gtt
checkpointtable ggt.chkpt
GGSCI (Oracle02 as ggt@orcl) 32> SQL> conn /as sysdba
Connected.
SQL> @marker_setup.sql
SQL> @ddl_setup.sql # GoldenGate 12c 不用关闭recyclebin
SQL> @role_setup.sql
SQL> grant ggs_ggsuser_role to ggt;
SQL> @ddl_enable.sql
SQL> @?/rdbms/admin/dbmspool.sql
SQL> @ddl_pin.sql ggt 3. linux上配置extract和pump进程
3.1 配置 extract
GGSCI (Oracle02 as ggt@orcl) 4> view param eora_t2
extract eora_t2
setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ddl include all
userid ggt,password ggt
tranlogoptions excludeuser ggt #避免出现死循环复制,window上的extract进程也需要进行此项设置
exttrail dirdat/sp
table scott.*;
GGSCI (Oracle02 as ggt@orcl) 6> add extract eora_t2,tranlog,begin now
EXTRACT added.
GGSCI (Oracle02 as ggt@orcl) 7> add exttrail dirdat/sp,extract eora_t2,megabytes 100
EXTTRAIL added. GGSCI (Oracle02 as ggt@orcl) 8> start extract eora_t2 GGSCI (Oracle02 as ggt@orcl) 24> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EORA_T2 00:10:26 00:00:10
REPLICAT RUNNING RORA_T1 00:00:00 02:42:29
GGSCI (Oracle02 as ggt@orcl) 25> 3.2 配置 pump
GGSCI (Oracle02 as ggt@orcl) 25> view params pora_t2
extract pora_t2
setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
passthru
rmthost 192.168.0.100,mgrport 7809
rmttrail dirdat/rp
table scott.*; GGSCI (Oracle02 as ggt@orcl) 26> add extract pora_t2,exttrailsource dirdat/sp
EXTRACT added. GGSCI (Oracle02 as ggt@orcl) 27> add rmttrail dirdat/rp extract pora_t2,megabytes 100
RMTTRAIL added. GGSCI (Oracle02 as ggt@orcl) 28> start extract pora_t2
Sending START request to MANAGER ...
EXTRACT PORA_T2 starting GGSCI (Oracle02 as ggt@orcl) 31> info all Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EORA_T2 00:00:00 00:00:00
EXTRACT RUNNING PORA_T2 00:00:00 00:00:05
REPLICAT RUNNING RORA_T1 00:00:00 00:00:02
GGSCI (Oracle02 as ggt@orcl) 32> 4.wind上配置replicat进程
GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 18> edit param rora_t2
GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 19> view param rora_t2
replicat rora_t2
setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ddl include all #ddl相关操作不要忘记添加
ddlerror default ignore retryop maxretries 3 retrydelay 5
userid ggs,password ggs
handlecollisions
assumetargetdefs
discardfile dirrpt/rora_t2.dsc,purge
map scott.* ,target scott.*; GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 20> add replicat rora_t2,exttrail dirdat/rp
REPLICAT added. GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 21> start replicat rora_t2
Sending START request to MANAGER ('GGSMGR') ...
REPLICAT RORA_T2 starting GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 22> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EORA_T1 00:00:02 00:00:00
EXTRACT RUNNING PORA_T1 00:00:00 00:00:01
REPLICAT RUNNING RORA_T2 00:00:00 00:00:02
GGSCI (WIN-GM5PVS1CILH as ggs@orcl) 23> 5.测试
5.1在linux平台创建表 插入数据
[oracle@Oracle02 ogg_src]$ sqlplus /nolog
SQL> conn scott/scott
Connected.
SQL> create table t5 (id number primary key,name varchar2(20));
Table created. SQL> insert into t5 values (1,'one');
1 row created. SQL> commit;
Commit complete. SQL> 5.2 在wind平台验证
C:\ora11g\product\ogg_src>sqlplus /nolog
SQL> conn /as sysdba
已连接。
SQL> conn scott/scott
已连接。
SQL> select * from t5; ID NAME
---------- --------------------
1 one SQL>

异构GoldenGate 12c 双向复制配置的更多相关文章

  1. 异构GoldenGate 12c 单向复制配置(支持DDL复制)

    1.开始配置OGG支持DDL复制(在source端操作) 1.1 赋予权限 SQL> conn /as sysdba 已连接. SQL> grant execute on utl_file ...

  2. 异构GoldenGate 12c 单向复制配置

    1.分别在windows2008.linux平台部署oracle 11.2.0.4 2.分别在windows2008.linux平台部署gg. 2.1 windows平台: gg的安装目录位 C:\o ...

  3. GoldenGate配置(二)之双向复制配置

     GoldenGate配置(二)之双向复制配置 环境: Item Source System Target System Platform Red Hat Enterprise Linux Serve ...

  4. Goldengate双向复制配置

    一.Goldengate双向复制配置 1.1.在进行如下配置之前,先在源数据库source system(原来的目标数据库)端 添加辅助的redolog配置: SQL>alter databas ...

  5. Oracle GoldenGate 12c实时捕获SQL Server数据

    在Oracle GoldenGate 12c中,对一些最新的数据库提供了支持,比如SQL Server 2012/2014,当然12c也支持sql server 2008.主要新增特性有: 捕获进程可 ...

  6. GoldenGate 12c + Oracle 12c Multitenant Container databases

    下面为GoldenGate 12c + Oracle 12c Multitenant Container databases例子 1.安装OGG 源 端OGG: C:\Oracle\product\1 ...

  7. GoldenGate 12c 新特性 Credential Store and USERIDALIAS

    GoldenGate 12C的Credential Store and USERIDALIAS新特性有点类似存储钱夹,提高了配置的易用性和安全性. --生成credentialstore文件 GGSC ...

  8. windows Sever 2012下Oracle 12c安装配置方法图文教程

    windows Sever 2012下Oracle 12c安装配置方法图文教程 Oracle 12c安装配置方法图文教程,具体内容如下 1.我们开启虚拟机 2.Windows Sever 2012启动 ...

  9. Oracle Service Bus (OSB) 12c 的配置安装

    Oracle Service Bus (OSB) 12c 的配置安装 1.OSB配置环境: Oracle Database Oracle Fusion Middleware Infrastructur ...

随机推荐

  1. Jackson轻易转换JSON

    原文http://www.cnblogs.com/hoojo/archive/2011/04/22/2024628.html Jackson可以轻松的将Java对象转换成json对象和xml文档,同样 ...

  2. NLP文本情感分类传统模型+深度学习(demo)

    文本情感分类: 文本情感分类(一):传统模型 摘自:http://spaces.ac.cn/index.php/archives/3360/ 测试句子:工信处女干事每月经过下属科室都要亲口交代24口交 ...

  3. ShowMask

    <html> <head> <script type="text/javascript"> function showMask(){ var a ...

  4. css float引发的塌陷问题及解决方案

    如果父元素高度自适应,而且子元素有设置float left/right, 那么此时父元素的高度不会随子元素而变,如果父元素不包含任何的可见背景,这个问题会很难被注意到,但是这是一个很重要的问题. ht ...

  5. Redis类的源码使用

    $redis = new Redis(); //连接redis服务器 $redis->connect('127.0.0.1', '6379'); $key = "key"; ...

  6. 利用图片的灰度平均值来进行分类实现手写图片识别&lpar;数据集50000张图片&rpar;——Jason niu

    from collections import defaultdict import mnist_loader def main(): training_data, validation_data, ...

  7. 牛客网暑期ACM多校训练营(第一场)J Different Integers

    链接:https://www.nowcoder.com/acm/contest/139/J 题意: 给你[l,r]问[1,l],[r,n]中有多少个不同的数. 思路: 可以参考上一篇博客:https: ...

  8. daterangepicker的个性化使用技巧

    由于该模板不自动将时间戳添加到input中去,始终为NaN,所以,自己选取起始时间与截止时间 var startTime =new Date(new Date().toLocaleDateString ...

  9. C&plus;&plus;笔记--抽象机制

    类 一个类就是一个用户定义类型 一个结构体也是一种类.(成员函数),因为不同的结构体中可能会有相同的名字的成员函数,所以我们在定义成员函数的时候就必须给出有关结构体的名字 void Data::ini ...

  10. Android应用开发基础篇(12)-----Socket通信(转载)

    转自:http://www.devdiv.com/android_socket_-blog-258060-10594.html 一.概述 网络通信无论在手机还是其他设备上都应用得非常广泛,因此掌握网络 ...