zoukankan      html  css  js  c++  java
  • OGG配置案例一(源表与目标表结构不一致)

    源库:   192.168.31.16     TNS=orcl 
    
    目标库:  192.168.31.113   TNS=vmsys
    ---------------------------------------------
    表结构:
    SQL> desc jack.t10  --源表
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     ID                                                 NUMBER
     NAME                                               VARCHAR2(800)
     AGE                                                NUMBER
    
    SQL> desc jack.t10 --目标表
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     TID                                                NUMBER
     TNAME                                              VARCHAR2(800)
     TAGE                                               NUMBER
    
    SQL> 
    
    源库OGG配置
    1. extract进程配置:
    GGSCI (rac01) 2> view param lxt10
    
    EXTRACT lxt10
    ------------------------------------------
    --  local extract for jack.t10
    ------------------------------------------
    SETENV (NLS_LANG=american_america.AL32UTF8)
    SETENV (ORACLE_SID=orcl)
    USERID ogg@orcl,PASSWORD ogg
    TRANLOGOPTIONS ASMUSER sys@ASM,ASMPASSWORD oracle
    EXTTRAIL /goldengate/dirdat/orcl/ww
    TABLE jack.t10;
    
    2. DataPump进程配置:
    GGSCI (rac01) 3> view param lpt10
    
    EXTRACT lpt10
    ----------------------------------------------
    --  DataPump extract lpjack for jack.t10
    ----------------------------------------------
    USERID ogg@orcl,PASSWORD ogg
    NOPASSTHRU
    RMTHOST  192.168.31.113 MGRPORT 7809
    RMTTRAIL  /goldengate/dirdat/orcl/ww
    TABLE  jack.t10;
    
    3. 创建定义参数文件
    GGSCI (rac01) 4> view param defgen
    
    DEFSFILE  /goldengate/dirdef/rejackt10.defs
    USERID    ogg@orcl,password ogg
    TABLE     jack.t10;
    
    4. 生成定义文件
    [oracle@rac01 goldengate]$ /goldengate/defgen paramfile /goldengate/dirprm/defgen.prm 
    
    5. 复制到目标端的/goldengate/dirdef/目录中
    scp /goldengate/dirdef/rejackt10.def 192.168.31.113:/goldengate/dirdef/
    
    目标库OGG配置
    1. replicat进程配置
    GGSCI (class113) 2> view param ret10
    
    replicat ret10
    -----------------------------
    -- replicat for jack.t10
    -----------------------------
    USERID ogg@vmsys,password ogg
    HandleCollisions
    SourceDefs   /goldengate/dirdef/rejackt10.defs  --此为定义文件,源端配置好复制过来的,目标端引用
    -- AssumeTargetDefs  --此参数不可与SourceDefs同用
    Map jack.t10,Target jack.t10,colmap(USEDEFAULTS,tid=id,tname=name,tage=age);
  • 相关阅读:
    git命令大全
    QT学习笔记7:C++函数默认参数
    QT学习笔记6:常见的 QGraphicsItem
    QT学习笔记5:QMouseEvent鼠标事件简介
    QT学习笔记4:QT中GraphicsView编程
    QT学习笔记3:QT中语法说明
    Opencv学习笔记5:Opencv处理彩虹图、铜色图、灰度反转图
    Opencv学习笔记4:Opencv处理调整图片亮度和对比度
    deploy java web in IDEA with tomcat
    mongodb install
  • 原文地址:https://www.cnblogs.com/vmsysjack/p/12426748.html
Copyright © 2011-2022 走看看