Use Goldengate Initial Data Load,goldengateinitial

來源:互聯網
上載者:User

Use Goldengate Initial Data Load,goldengateinitial

我們在搭建ogg的時候,通常需要先對目標庫進行初始化,那麼初始化的方式很多。現在介紹ogg自己的初始化方式。

測試環境:Souce DB:OS:redhat 6.3Name:zbdba1DB:11.2.0.4OGG:11.2.1.0.1Target DB:OS:redhat 6.3Name:zbdba2DB:11.2.0.4OGG:11.2.1.0.1

這裡著重介紹 Initial Load,具體安裝配置請參考:
http://blog.csdn.net/zbdba/article/details/38794415


Source and target DB:
配置並開啟manager進程:

GGSCI (zbdba1) 1> view param mgrport 7839DYNAMICPORTLIST 7840-7914USERID OGG,PASSWORD oggAUTORESTART REPLICAT *, RETRIES 5, WAITMINUTES 3PURGEOLDEXTRACTS ./DIRDAT/*,MINKEEPDAYS 3PURGEDDLHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10,FREQUENCYMINUTES 30PURGEMARKERHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10LAGREPORTHOURS 1LAGINFOMINUTES 30LAGCRITICALMINUTES 45GGSCI (zbdba2) 11> view param mgrport 7839DYNAMICPORTLIST 7840-7914USERID OGG,PASSWORD oggAUTORESTART REPLICAT *, RETRIES 5, WAITMINUTES 3PURGEOLDEXTRACTS ./dirdat/*,MINKEEPDAYS 3PURGEDDLHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10,FREQUENCYMINUTES 30PURGEMARKERHISTORY MINKEEPDAYS 7,MAXKEEPDAYS 10LAGREPORTHOURS 1LAGINFOMINUTES 30LAGCRITICALMINUTES 45 start manager
Source:
配置initload 抽取進程:

GGSCI (zbdba1) 7> info allProgram     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING                                          GGSCI (zbdba1) 8>GGSCI (zbdba1) 8>GGSCI (zbdba1) 8> add extract initload,sourceistableEXTRACT added.GGSCI (zbdba1) 9> info allProgram     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING                                          GGSCI (zbdba1) 10> edit param initloadEXTRACT initloadUSERID ogg, PASSWORD oggRMTHOST 192.168.56.61, MGRPORT 7839RMTTASK replicat, GROUP reploadTABLE zbdba.test;
Target:
配置repload 複製進程

GGSCI (zbdba2) 9> add replicat repload,specialrunREPLICAT added.GGSCI (zbdba2) 10>GGSCI (zbdba2) 10>GGSCI (zbdba2) 10>GGSCI (zbdba2) 10> edit param reploadREPLICAT reploadUSERID ogg, PASSWORD oggASSUMETARGETDEFSMAP zbdba.test, TARGET zbdba.test;source:SQL> conn zbdba/oracle;Connected.SQL> select count(1) from test;  COUNT(1)----------     86315target:SQL> select count(1) from test;  COUNT(1)----------         0
source:
開啟抽取進程:

GGSCI (zbdba1) 15> start extract initloadSending START request to MANAGER ...EXTRACT INITLOAD starting
查看日誌:

2015-02-27 02:18:25  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (ogg): start extract initload.2015-02-27 02:18:25  INFO    OGG-00963  Oracle GoldenGate Manager for Oracle, mgr.prm:  Command received from GGSCI on host zbdba1 (START EXTRACT INITLOAD ).2015-02-27 02:18:25  INFO    OGG-00975  Oracle GoldenGate Manager for Oracle, mgr.prm:  EXTRACT INITLOAD starting.2015-02-27 02:18:25  INFO    OGG-01017  Oracle GoldenGate Capture for Oracle, initload.prm:  Wildcard resolution set to IMMEDIATE because SOURCEISTABLE is used.2015-02-27 02:18:25  INFO    OGG-00992  Oracle GoldenGate Capture for Oracle, initload.prm:  EXTRACT INITLOAD starting.2015-02-27 02:18:25  INFO    OGG-03035  Oracle GoldenGate Capture for Oracle, initload.prm:  Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.2015-02-27 02:18:29  WARNING OGG-00869  Oracle GoldenGate Capture for Oracle, initload.prm:  No unique key is defined for table 'TEST'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.2015-02-27 02:18:29  INFO    OGG-01815  Oracle GoldenGate Capture for Oracle, initload.prm:  Virtual Memory Facilities for: COM    anon alloc: mmap(MAP_ANON)  anon free: munmap    file alloc: mmap(MAP_SHARED)  file free: munmap    target directories:    /ogg/dirtmp.2015-02-27 02:18:29  INFO    OGG-00993  Oracle GoldenGate Capture for Oracle, initload.prm:  EXTRACT INITLOAD started.

查看抽取情況:

GGSCI (zbdba1) 18> info initloadEXTRACT    INITLOAD  Last Started 2015-02-27 02:18   Status RUNNINGCheckpoint Lag       Not AvailableLog Read Checkpoint  Table ZBDBA.TEST                     2015-02-27 02:19:25  Record 43671Task                 SOURCEISTABLEGGSCI (zbdba1) 19> info initloadEXTRACT    INITLOAD  Last Started 2015-02-27 02:18   Status RUNNINGCheckpoint Lag       Not AvailableLog Read Checkpoint  Table ZBDBA.TEST                     2015-02-27 02:19:35  Record 54025Task                 SOURCEISTABLEGGSCI (zbdba1) 20> !  info initloadEXTRACT    INITLOAD  Last Started 2015-02-27 02:18   Status STOPPEDCheckpoint Lag       Not AvailableLog Read Checkpoint  Table ZBDBA.TEST                     2015-02-27 02:20:16  Record 86315Task                 SOURCEISTABLE發現已抽取完成

target:
查看日誌:

2015-02-27 02:18:54  INFO    OGG-00995  Oracle GoldenGate Delivery for Oracle, repload.prm:  REPLICAT REPLOAD starting.2015-02-27 02:18:54  INFO    OGG-03035  Oracle GoldenGate Delivery for Oracle, repload.prm:  Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.2015-02-27 02:18:55  INFO    OGG-01815  Oracle GoldenGate Delivery for Oracle, repload.prm:  Virtual Memory Facilities for: COM    anon alloc: mmap(MAP_ANON)  anon free: munmap    file alloc: mmap(MAP_SHARED)  file free: munmap    target directories:    /ogg/dirtmp.2015-02-27 02:18:55  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, repload.prm:  REPLICAT REPLOAD started.2015-02-27 02:18:59  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, repload.prm:  No unique key is defined for table 'TEST'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.2015-02-27 02:20:21  INFO    OGG-00994  Oracle GoldenGate Delivery for Oracle, repload.prm:  REPLICAT REPLOAD stopped normally.發現repload進程已經自動啟動並且複製完畢自動停止了。

查看資料庫表:

SQL> select count(1) from test;  COUNT(1)----------     86315已經完成初始化






相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.