Use Goldengate Initial Data Load, goldengateinitial

Source: Internet
Author: User

Use Goldengate Initial Data Load, goldengateinitial

When building ogg, we usually need to initialize the target Library first, so there are many initialization methods. Now we will introduce ogg's own initialization method.

Test environment: Souce DB: OS: redhat 6.3 Name: zbdba1DB: 11.2.0.4OGG: 11.2.1.0.1Target DB: OS: redhat 6.3 Name: zbdba2DB: 11.2.0.4OGG: 11.2.1.0.1

This section focuses on Initial Load. For detailed installation and configuration, see:
Http://blog.csdn.net/zbdba/article/details/38794415


Source and target DB:
Configure and enable the manager process:

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:
Configure the initload extraction process:

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:
Configure the repload replication process

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:
Enable extraction process:

GGSCI (zbdba1) 15> start extract initloadSending START request to MANAGER ...EXTRACT INITLOAD starting
View logs:

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.

View extraction information:

GGSCI (zbdba1) 18> info initloadEXTRACT INITLOAD Last Started 2015-02-27 Status RUNNINGCheckpoint Lag Not AvailableLog Read Checkpoint Table ZBDBA. TEST 02:19:25 Record 43671 Task SOURCEISTABLEGGSCI (zbdba1) 19> info initloadEXTRACT INITLOAD Last Started 2015-02-27 Status RUNNINGCheckpoint Lag Not AvailableLog Read Checkpoint Table ZBDBA. TEST 02:19:35 Record 54025Tas K SOURCEISTABLEGGSCI (zbdba1) 20>! Info initloadEXTRACT INITLOAD Last Started 2015-02-27 02:20:16 Status STOPPEDCheckpoint Lag Not AvailableLog Read Checkpoint Table ZBDBA. TEST Record 86315 Task SOURCEISTABLE found extracted

Target:
View logs:

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 :. 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 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. it is found that the repload process has been started automatically and the replication has stopped automatically.

View database tables:

SQL> select count (1) from test; COUNT (1) ---------- 86315 initialization has been completed






Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.