1 2 Previous Next 28 Replies Latest reply: May 11, 2012 3:15 AM by -joe RSS

    GG only works on first replication

    930982
      Hi, I'm pretty new to GoldenGate, so I must be making some silly mistake; though, I can't seem to figure out what I'm doing wrong.

      I followed a tutorial to make GG replicate data from a MySQL database to an Oracle database.
      Everything went fine on the first load, and while it was running, I could perform changes on the MySQL DB and see them reflected on Oracle.
      Anyway, whenever I turn off/reboot my computer, I restart the services and replication doesn't seem to work anymore: I insert data on MySQL and Oracle isn't updated as it should.
      I start the managers, then EMASTR and PMASTR on source (which correspond to data change capture and data pump, I think) and finally start RMASTR on target (which is responsible for replication).

      Any help would be highly appreciated.
      The parameter files are below:


      MANAGER (SOURCE):
      PORT 7809
      DYNAMICPORTLIST 8001, 8002, 9500-9502
      PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS
      CHECKMINUTES 5

      MANAGER (TARGET):
      PORT 15000
      DYNAMICPORTLIST 15010-15020
      PURGEOLDEXTRACTS /u01/oraclegg/dirdat/*, USECHECKPOINTS
      CHECKMINUTES 5

      RLOAD (TARGET):
      REPLICAT RLOAD
      USERID orgg, PASSWORD orgg
      ASSUMETARGETDEFS
      MAP MYBANK.*, TARGET ORGG.*;

      ELOAD (SOURCE):
      EXTRACT ELOAD
      RMTHOST 127.0.0.1, MGRPORT 15000
      RMTTASK REPLICAT, GROUP RLOAD
      SOURCEDB MYBANK USERID mygg, PASSWORD mygg
      TABLE MYBANK.*;

      EMASTR (SOURCE):
      EXTRACT EMASTR
      EXTTRAIL ./dirdat/em
      SOURCEDB MYBANK, USERID mygg, PASSWORD mygg
      STATOPTIONS RESETREPORTSTATS
      REPORT AT 00:01
      REPORTROLLOVER AT 00:01
      REPORTCOUNT EVERY 60 SECONDS, RATE
      TABLE MYBANK.*;

      PMASTR (SOURCE):
      EXTRACT PMASTR
      RMTHOST 127.0.0.1, MGRPORT 15000
      RMTTRAIL ./dirdat/pm
      PASSTHRU
      TABLE MYBANK.*;

      RMASTR (TARGET):
      REPLICAT RMASTR
      HANDLECOLLISIONS
      END RUNTIME
      USERID orgg, PASSWORD orgg
      ASSUMETARGETDEFS
      DISCARDFILE ./dirrpt/rmastr.dsc, purge
      STATOPTIONS RESETREPORTSTATS
      REPORT AT 00:01
      REPORTROLLOVER AT 00:01
      REPORTCOUNT EVERY 60 SECONDS, RATE
      MAP MYBANK.*, TARGET ORGG.*;
        • 1. Re: GG only works on first replication
          amardeep.sidhu
          Are all the processes on source and target running ?

          Could you post the output of INFO ALL from source and the target ?
          • 2. Re: GG only works on first replication
            930982
            Yes, they are all running.
            INFO ALL outputs this:

            On source:
            Program Status Group Lag Time Since Chkpt

            MANAGER RUNNING
            EXTRACT RUNNING EMASTR 00:00:00 00:00:01
            Description Capture change data from Redo
            EXTRACT RUNNING PMASTR 00:00:00 00:00:08
            Description Reads from dirdat/em on SOURCE and writes to dirdat/pm on TARGET


            On target:
            Program Status Group Lag Time Since Chkpt

            MANAGER RUNNING
            REPLICAT RUNNING RMASTR 00:00:00 00:00:07
            Description Change Data Apply - Reads from dirdat/pm
            • 3. Re: GG only works on first replication
              amardeep.sidhu
              Are the files successfully transferring to the target ?

              Did you try running the stats command on Replicat ? Does it show any transactions being run ?
              • 4. Re: GG only works on first replication
                415289
                check GG log file ggserr.log for more detail on this.
                • 5. Re: GG only works on first replication
                  930982
                  No, I could only transfer the first time I ran it, right after I configured everything.
                  Then, after I rebooted my machine, whenever I make a new insert on source, the target is not updated.

                  Stats shows nothing being run, all values are zero, both on target and source.

                  If I make some update on the source, without GG being running, then start GG after this, it should identifiy the changes, shouldn't it? Is there any special process I should start, or edit some of the ones I've posted on my first message?
                  • 6. Re: GG only works on first replication
                    930982
                    The ggserr.log file on source is as follows:

                    +2012-05-02 02:34:36 INFO OGG-00987 Oracle GoldenGate Command Interpreter for MySQL: GGSCI command (mygg): start mgr.+
                    +2012-05-02 02:34:37 INFO OGG-00983 Oracle GoldenGate Manager for MySQL, mgr.prm: Manager started (port 7809).+
                    +2012-05-02 02:34:37 INFO OGG-01338 Oracle GoldenGate Manager for MySQL, mgr.prm: mgr: The Network Server service was started successfully.+
                    +2012-05-02 02:34:37 INFO OGG-01227 Oracle GoldenGate Manager for MySQL, mgr.prm: Waiting for connection on port 7809 ..+
                    +2012-05-02 02:34:37 INFO OGG-01338 Oracle GoldenGate Manager for MySQL, mgr.prm: mgr: The ProcessManager service was started successfully.+
                    +2012-05-02 02:34:37 INFO OGG-01338 Oracle GoldenGate Manager for MySQL, mgr.prm: mgr: The Watchdog service was started successfully.+
                    +2012-05-02 02:34:37 INFO OGG-00975 Oracle GoldenGate Manager for MySQL, mgr.prm: Manager service started successfully.+
                    +2012-05-02 02:34:38 INFO OGG-00957 Oracle GoldenGate Manager for MySQL, mgr.prm: Purged old extract file /u01/mysqlgg/dirdat/em000021, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 22 > 21.+
                    +2012-05-02 02:34:49 INFO OGG-00987 Oracle GoldenGate Command Interpreter for MySQL: GGSCI command (mygg): start *.+
                    +2012-05-02 02:34:49 INFO OGG-01229 Oracle GoldenGate Manager for MySQL, mgr.prm: Connected to [::ffff:127.0.0.1]:7809.+
                    +2012-05-02 02:34:49 INFO OGG-00963 Oracle GoldenGate Manager for MySQL, mgr.prm: Command received from GGSCI on host [::ffff:127.0.0.1] (START EXTRACT EMASTR ).+
                    +2012-05-02 02:34:49 INFO OGG-01229 Oracle GoldenGate Manager for MySQL, mgr.prm: Connected to [::ffff:127.0.0.1]:7809.+
                    +2012-05-02 02:34:49 INFO OGG-00963 Oracle GoldenGate Manager for MySQL, mgr.prm: Command received from GGSCI on host [::ffff:127.0.0.1] (START EXTRACT PMASTR ).+
                    +2012-05-02 02:34:51 INFO OGG-00992 Oracle GoldenGate Capture for MySQL, pmastr.prm: EXTRACT PMASTR starting.+
                    +2012-05-02 02:34:51 INFO OGG-00992 Oracle GoldenGate Capture for MySQL, emastr.prm: EXTRACT EMASTR starting.+
                    +2012-05-02 02:34:51 INFO OGG-00993 Oracle GoldenGate Capture for MySQL, pmastr.prm: EXTRACT PMASTR started.+
                    +2012-05-02 02:34:52 INFO OGG-00506 Oracle GoldenGate Capture for MySQL, emastr.prm: Both GETTRUNCATES and DDL replication are enabled.+
                    +2012-05-02 02:34:52 INFO OGG-00993 Oracle GoldenGate Capture for MySQL, emastr.prm: EXTRACT EMASTR started.+
                    +2012-05-02 02:34:52 INFO OGG-01055 Oracle GoldenGate Capture for MySQL, emastr.prm: Recovery initialization completed for target file ./dirdat/em000022, at RBA 950.+
                    +2012-05-02 02:34:52 INFO OGG-01478 Oracle GoldenGate Capture for MySQL, emastr.prm: Output file ./dirdat/em is using format RELEASE 10.4.+
                    +2012-05-02 02:34:52 INFO OGG-01026 Oracle GoldenGate Capture for MySQL, emastr.prm: Rolling over remote file ./dirdat/em000022.+
                    +2012-05-02 02:34:52 INFO OGG-01053 Oracle GoldenGate Capture for MySQL, emastr.prm: Recovery completed for target file ./dirdat/em000023, at RBA 950.+
                    +2012-05-02 02:34:52 INFO OGG-01057 Oracle GoldenGate Capture for MySQL, emastr.prm: Recovery completed for all targets.+
                    +2012-05-02 02:34:52 INFO OGG-00182 Oracle GoldenGate Capture for MySQL, emastr.prm: VAM API running in single-threaded mode.+
                    +2012-05-02 02:34:52 INFO OGG-01513 Oracle GoldenGate Capture for MySQL, emastr.prm: Positioning to LogNum - 7608 Record Offset - 1370.+
                    +2012-05-02 02:34:54 INFO OGG-01516 Oracle GoldenGate Capture for MySQL, emastr.prm: Positioned to LogNum - 7608 Record Offset - 1370, Apr 13, 2012 11:52:16 AM.+
                    +2012-05-02 02:34:56 INFO OGG-01226 Oracle GoldenGate Capture for MySQL, pmastr.prm: Socket buffer size set to 27985 (flush size 27985).+
                    +2012-05-02 02:34:57 INFO OGG-01055 Oracle GoldenGate Capture for MySQL, pmastr.prm: Recovery initialization completed for target file ./dirdat/pm000021, at RBA 578.+
                    +2012-05-02 02:34:57 INFO OGG-01478 Oracle GoldenGate Capture for MySQL, pmastr.prm: Output file ./dirdat/pm is using format RELEASE 10.4.+
                    +2012-05-02 02:34:57 INFO OGG-01026 Oracle GoldenGate Capture for MySQL, pmastr.prm: Rolling over remote file ./dirdat/pm000022.+
                    +2012-05-02 02:34:57 INFO OGG-01053 Oracle GoldenGate Capture for MySQL, pmastr.prm: Recovery completed for target file ./dirdat/pm000022, at RBA 456.+
                    +2012-05-02 02:34:57 INFO OGG-01057 Oracle GoldenGate Capture for MySQL, pmastr.prm: Recovery completed for all targets.+
                    +2012-05-02 02:36:05 INFO OGG-01021 Oracle GoldenGate Capture for MySQL, emastr.prm: Command received from GGSCI: STATS.+
                    +2012-05-02 02:36:09 INFO OGG-01021 Oracle GoldenGate Capture for MySQL, pmastr.prm: Command received from GGSCI: STATS.+
                    +2012-05-02 02:39:39 INFO OGG-00957 Oracle GoldenGate Manager for MySQL, mgr.prm: Purged old extract file /u01/mysqlgg/dirdat/em000022, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 23 > 22.+



                    On target it's:

                    +2012-05-02 02:34:34 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (orgg): start mgr.+
                    +2012-05-02 02:34:35 INFO OGG-00983 Oracle GoldenGate Manager for Oracle, mgr.prm: Manager started (port 15000).+
                    +2012-05-02 02:34:35 INFO OGG-00957 Oracle GoldenGate Manager for Oracle, mgr.prm: Purged old extract file /u01/oraclegg/dirdat/pm000020, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 21 > 20.+
                    +2012-05-02 02:34:51 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from EXTRACT on host 127.0.0.1 (START SERVER CPU -1 PRI -1 PARAMS ).+
                    +2012-05-02 02:34:51 INFO OGG-00974 Oracle GoldenGate Manager for Oracle, mgr.prm: Manager started collector process (Port 15010).+
                    +2012-05-02 02:34:51 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (orgg): start *.+
                    +2012-05-02 02:34:51 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from GGSCI on host 127.0.0.1 (START REPLICAT RMASTR ).+
                    +2012-05-02 02:34:51 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: REPLICAT RMASTR starting.+
                    +2012-05-02 02:34:53 INFO OGG-01677 Oracle GoldenGate Collector: Waiting for connection (started dynamically).+
                    +2012-05-02 02:34:54 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rmastr.prm: REPLICAT RMASTR starting.+
                    +2012-05-02 02:34:56 INFO OGG-01229 Oracle GoldenGate Collector: Connected to 127.0.0.1:59675.+
                    +2012-05-02 02:34:56 INFO OGG-01669 Oracle GoldenGate Collector: Opening ./dirdat/pm000021 (byte -1, current EOF 578).+
                    +2012-05-02 02:34:57 INFO OGG-01670 Oracle GoldenGate Collector: Closing ./dirdat/pm000021.+
                    +2012-05-02 02:34:57 INFO OGG-01669 Oracle GoldenGate Collector: Opening ./dirdat/pm000021 (byte 578, current EOF 578).+
                    +2012-05-02 02:34:57 INFO OGG-01670 Oracle GoldenGate Collector: Closing ./dirdat/pm000021.+
                    +2012-05-02 02:34:57 INFO OGG-01669 Oracle GoldenGate Collector: Opening ./dirdat/pm000022 (byte -1, current EOF 0).+
                    +2012-05-02 02:34:59 INFO OGG-00506 Oracle GoldenGate Delivery for Oracle, rmastr.prm: Both GETTRUNCATES and DDL replication are enabled.+
                    +2012-05-02 02:35:00 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rmastr.prm: REPLICAT RMASTR started.+
                    +2012-05-02 02:35:00 INFO OGG-01020 Oracle GoldenGate Delivery for Oracle, rmastr.prm: Processed extract process RESTART_ABEND record at seq 22, rba 456 (aborted 0 records).+
                    +2012-05-02 02:35:00 INFO OGG-01020 Oracle GoldenGate Delivery for Oracle, rmastr.prm: Processed extract process RESTART_ABEND record at seq 22, rba 517 (aborted 0 records).+
                    +2012-05-02 02:35:52 INFO OGG-01021 Oracle GoldenGate Delivery for Oracle, rmastr.prm: Command received from GGSCI: STATS.+
                    +2012-05-02 02:39:35 INFO OGG-00957 Oracle GoldenGate Delivery for ORacle, mgr.prm: Purged old extract file /u01/oraclegg/dirdat/pm000021, applying UseCheckPoints purge rule: Oldest Chekpt Seqno 22 > 21.+


                    I don't really understand what could be wrong, can you spot anything?
                    Thanks.
                    • 7. Re: GG only works on first replication
                      amardeep.sidhu
                      Can you post the output of VIEW REPORT <EXTRACT> from the source.
                      • 8. Re: GG only works on first replication
                        930982
                        This is the output of VIEW REPORT EMASTR:


                        Description: Capture change data from Redo

                        ***********************************************************************
                        **            Running with the following parameters                  **
                        ***********************************************************************
                        EXTRACT EMASTR

                        EXTTRAIL ./dirdat/em
                        GETTRUNCATES

                        SOURCEDB MYBANK, USERID mygg, PASSWORD ****

                        STATOPTIONS RESETREPORTSTATS

                        REPORT AT 00:01

                        REPORTROLLOVER AT 00:01

                        REPORTCOUNT EVERY 60 SECONDS, RATE

                        TABLE MYBANK.ACCOUNT;
                        TABLE MYBANK.ACCOUNT_TRANS;
                        TABLE MYBANK.BRANCH;
                        TABLE MYBANK.BRANCH_ATM;
                        TABLE MYBANK.TELLER;
                        TABLE MYBANK.TELLER_TRANS;
                        TABLE MYBANK.TESTE;
                        DDL

                        +2012-05-02 02:34:52 INFO OGG-00506 Both GETTRUNCATES and DDL replicati+
                        on are enabled.

                        CACHEMGR virtual memory values (may have been adjusted)
                        CACHEBUFFERSIZE:                         64K
                        CACHESIZE:                                2G
                        CACHEBUFFERSIZE (soft max):               4M
                        CACHEPAGEOUTSIZE (normal):                4M
                        PROCESS VM AVAIL FROM OS (min):        2.86G
                        CACHESIZEMAX (strict force to disk):   2.63G

                        Database Version:
                        MySQL
                        Server Version: 5.1.46-log
                        Client Version: 6.0.0
                        Host Connection: Localhost via UNIX socket
                        Protocol Version: 10

                        +2012-05-02 02:34:52 INFO OGG-01055 Recovery initialization completed f+
                        or target file ./dirdat/em000022, at RBA 950.

                        +2012-05-02 02:34:52 INFO OGG-01478 Output file ./dirdat/em is using fo+
                        rmat RELEASE 10.4.

                        +2012-05-02 02:34:52 INFO OGG-01026 Rolling over remote file ./dirdat/e+
                        m000022.

                        +2012-05-02 02:34:52 INFO OGG-01053 Recovery completed for target file+
                        +./dirdat/em000023, at RBA 950.+

                        +2012-05-02 02:34:52 INFO OGG-01057 Recovery completed for all targets.+

                        +2012-05-02 02:34:52 INFO OGG-00182 VAM API running in single-threaded+
                        mode.

                        +2012-05-02 02:34:52 INFO OGG-01513 Positioning to LogNum - 7608+
                        Record Offset - 1370.

                        +2012-05-02 02:34:54 INFO OGG-01516 Positioned to LogNum - 7608+
                        Record Offset - 1370, Apr 13, 2012 11:52:16 AM.



                        And this is from PMASTR:


                        Description: Reads from dirdat/em on SOURCE and writes to dirdat/pm on TARG
                        ET

                        **            Running with the following parameters                  **
                        ***********************************************************************
                        EXTRACT PMASTR
                        RMTHOST 127.0.0.1, MGRPORT 15000
                        RMTTRAIL ./dirdat/pm
                        PASSTHRU
                        GETTRUNCATES
                        TABLE MYBANK.*;


                        CACHEMGR virtual memory values (may have been adjusted)
                        CACHEBUFFERSIZE:                         64K
                        CACHESIZE:                                2G
                        CACHEBUFFERSIZE (soft max):               4M
                        CACHEPAGEOUTSIZE (normal):                4M
                        PROCESS VM AVAIL FROM OS (min):        2.86G
                        CACHESIZEMAX (strict force to disk):   2.63G

                        +2012-05-02 02:34:56 INFO OGG-01226 Socket buffer size set to 27985 (fl+
                        ush size 27985).

                        +2012-05-02 02:34:57 INFO OGG-01055 Recovery initialization completed f+
                        or target file ./dirdat/pm000021, at RBA 578.

                        +2012-05-02 02:34:57 INFO OGG-01478 Output file ./dirdat/pm is using fo+
                        rmat RELEASE 10.4.

                        +2012-05-02 02:34:57 INFO OGG-01026 Rolling over remote file ./dirdat/p+
                        m000022.

                        +2012-05-02 02:34:57 INFO OGG-01053 Recovery completed for target file+
                        +./dirdat/pm000022, at RBA 456.+

                        +2012-05-02 02:34:57 INFO OGG-01057 Recovery completed for all targets.+



                        Thanks for the attention!

                        Edited by: Caio on May 2, 2012 1:33 PM
                        • 9. Re: GG only works on first replication
                          EmaxG
                          Can you try taking out the DDL options you have configured? I am pretty sure DDL replication is only supported between similar Oracle databases
                          • 10. Re: GG only works on first replication
                            930982
                            I've tried it, no success though.
                            • 11. Re: GG only works on first replication
                              amardeep.sidhu
                              I have not got much idea about MySQL side.

                              Could you try running the extract with bare minimum parameters. Comment out everything that is not mandatory.

                              And I hope that you have already checked the things like trandata is enabled etc.
                              • 12. Re: GG only works on first replication
                                930982
                                I've tried to run with EXTRACT parameters as:
                                EMASTR (SOURCE):
                                EXTRACT EMASTR
                                EXTTRAIL ./dirdat/em
                                SOURCEDB MYBANK, USERID mygg, PASSWORD mygg
                                TABLE MYBANK.*;

                                Still, no success.
                                What I find odd is that the first time I configured, it worked ALL FINE! It just stopped when I rebooted the system. And I've already configured it another time, in a new VM, and got it working too, but, as before, only until I rebooted the system.

                                Is there something else I must start after everything is already set up?
                                I mean, I got it all configured, I boot my system, then I start managers, extact process, and replicat process. Something else I should do? Like, login on database before, or start task processes, etc?
                                • 13. Re: GG only works on first replication
                                  EmaxG
                                  It doesnt seem you are missing anything.

                                  Is trandata enabled?
                                  • 14. Re: GG only works on first replication
                                    930982
                                    Trandata should be enabled on source?
                                    Whenever I try to run the command:
                                    ADD TRANDATA MYBANK.*
                                    It says "Invalid Command"

                                    Am I doing it wrong?
                                    1 2 Previous Next