博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
异构GoldenGate 12c 双向复制配置
阅读量:5051 次
发布时间:2019-06-12

本文共 5263 字,大约阅读时间需要 17 分钟。

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>

 

转载于:https://www.cnblogs.com/polestar/p/6179526.html

你可能感兴趣的文章
07-图4 哈利·波特的考试
查看>>
iOS学习之iOS程序名称及内容国际化(本地化)
查看>>
生产案例、Linux出现假死,怎么回事?
查看>>
树结构(三)---- 多路查找树
查看>>
07深入理解C指针之---指针类型和长度
查看>>
06深入理解C指针之---指针操作和比较
查看>>
SQL Server发送邮件的存储过程
查看>>
【20160924】GOCVHelper 图像处理部分(3)
查看>>
HashMap底层原理
查看>>
js/jQuery实现类似百度搜索功能
查看>>
【转】排序算法复习(Java实现)(一): 插入,冒泡,选择,Shell,快速排序
查看>>
myeclipse中修改servlet的模板代码
查看>>
js 倒计时10s
查看>>
再次陷入迷惘期的一点感想
查看>>
字符串的常用方法
查看>>
SQL查询语句 常用示例
查看>>
抄写例题作业1
查看>>
Nginx geo模块
查看>>
mingw using pthread
查看>>
centos6.4搭建基于ftp的yum源让本地局域网服务器使用
查看>>