2 Replies Latest reply on Jan 29, 2013 9:21 PM by stevencallan

    Unable to replicate schema using goldengate after initial load

      Hi ,
      I have a schema and i want to replicate it to another database using goldengate. I configured initial-laod-extract on the source and corresponding replicat on the target system. By this i was able to successfully do the initial load of data from source to target. After initial load i have create another separate extract and replicat process for replication of data. But the data is not getting replicated after the initial load.

      This is one way replication.
      databases --- oracle 11g r2
      o/s --- rhel 5
      gg - 11.1

      I am new to Goldengate so i might be missing something, please help me to resolve this..

        • 1. Re: Unable to replicate schema using goldengate after initial load
          what steps did you perform to replicat the data after initial load?

          Here a demo that gets the changes and pushes them to the target (w/o a data pump):

          Just again a summary about the pre requisites:
          Prepare Oracle database SOURCE:
          alter system switch logfile;
          SELECT supplemental_log_data_min FROM v$database;

          Within the GG Manager (should be done already):
          create subdirs

          edit params mgr
          => Port 7809

          ==> start mgr

          Now I define an extract process on my source side and tell it where I want to push the data to (rmttrail):

          Extract Prozess:
          edit param exkgr

          EXTRACT exkgr
          USERID kgr, PASSWORD kgr
          RMTHOST zkupchv119.de.oracle.com, MGRPORT 7809
          RMTTRAIL ./dirdat/ek
          TABLE kgr.tcustmer;
          TABLE kgr.tcustord;

          Now add and start the extract:
          GGSCI (edvmr1p0) 5> add extract exkgr, tranlog, begin now
          EXTRACT added.

          GGSCI (edvmr1p0) 6> add exttrail ./dirdat/ek, extract exkgr, megabytes 5
          EXTTRAIL added.

          GGSCI (edvmr1p0) 7> start exkgr

          Sending START request to MANAGER ...
          EXTRACT EXKGR starting

          GGSCI (edvmr1p0) 8> Program Status Group Lag at Chkpt Time Since Chkpt

          EXTRACT RUNNING EXKGR 00:00:00 00:00:06

          so from now on the extract will put the inforation automatically to the target location - when you have a look at the rmthost location you'll see depending on rmttrail a file "ek<6 Znumbers>" is created and the size increases when you add data.

          Replication Process

          pre requisite is defining a checkpoint table:
          0. SQL*Plus als user kgr: @chkpt_ora_create.sql

          GoldenGate Manager:
          1. add Checkpointtable in GLOBALS using edit param ./GLOBALS:
          CHECKPOINTTABLE kgr.ggschkpt
          2. GGSCI (ZKUPCHV119) 2> DBLOGIN userid kgr, password kgr
          Successfully logged into database.
          3. GGSCI (ZKUPCHV119) 2> add checkpointtable

          No checkpoint table specified, using GLOBALS specification (kgr.ggschkpt)...

          Successfully created checkpoint table kgr.ggschkpt.

          Now a parameter file for the replicat process:
          edit params repkg
          REPLICAT repkg
          USERID kgr, PASSWORD kgr
          DISCARDFILE ./dirrpt/diskg.dsc, purge
          MAP kgr.*, TARGET kgr.*;

          Finally start the REPLICAT:
          GGSCI (edvmr1p0) 7> add replicat repkg, exttrail ./dirdat/ek
          REPLICAT added.

          GGSCI (edvmr1p0) 8> start repkg

          Sending START request to MANAGER ...
          REPLICAT REPKG starting

          GGSCI (ZKUPCHV119) 9> info all

          Program Status Group Lag at Chkpt Time Since Chkpt

          REPLICAT RUNNING REPKG 00:00:00 00:00:00

          When I now add something to the source it is replicated to the target.

          ... Yes, I know a very basic example, but always good as a starter. For more skilled people use data pump etc.

          Edited by: kgronau on Jan 28, 2013 3:29 PM
          when it still fails, please provide the extract and replicat logs
          • 2. Re: Unable to replicate schema using goldengate after initial load
            Have you tried the tutorials at Oracle Learning Library?


            Oracle to Oracle