5 Replies Latest reply: Oct 15, 2013 10:20 AM by Maheswar RSS

    New to OracleGG..Need a clarification

    AnandKumar

      Hi All,

       

      I am new to OracleGG and implemented one-way replication  few days back (Oracle 11g db to Oracle 11g db) and it is happening successfully. My question is, consider an insert to a table (HR.EMP) with PK constraint is happening in source.Before replicate process is replicating the insert statement from source to target.If i manually insert the same statement in target, What would happen (replicate insert would fail with unique constraint error) and how to handle this type of manual insert in real time scenario. Is there any parameter in GG ?

       

      Hope i have explained my question clear. Thanks in advance

       

      Regards,

      Anand.

        • 1. Re: New to OracleGG..Need a clarification
          Maheswar

          hi ,

           

          1.please take expdp intital load with min trancation time scn as below and start extrator with same time.

           

          sql>select min(startup_time) from v$trancation;

           

          2.import it target.

           

          3.while starting replicat process use same scn to start replicator as below.

           

          start replicat <replicater_name>, aftercsn <scn_number>

           

           

          so that u can not find any missed rows at target while replicaton process.

          • 2. Re: New to OracleGG..Need a clarification
            AnandKumar

            Hi Mahesh,

             

            i tried it, min(start_time) is blank in the source db and a value is there (10/15/13 18:23:18) is there in target.

             

            My question is, since the target DB is in open state, it will lead to data modifications and resulting in data change. How to avoid this?

             

            To add further, customer is moving from physical standby setup to oracle GG. As we know, in physical standby (datagaurd)  the dr db will be in read only mode or replication mode where there is no chance of  DMLs.

             

            Regards,

            Anand.

            • 3. Re: New to OracleGG..Need a clarification
              Maheswar

              hi Anand,

               

                   sorry i'm not getting what you want exactly..please can u explain again.....

                i think your asking about switchover of pri and standby..????

              • 4. Re: New to OracleGG..Need a clarification
                AnandKumar


                source DB
                =========
                SQL> insert into jobs values ('DBA3','DBA',2000,10000);

                 

                1 row created.

                 

                SQL> commit;

                 

                Commit complete.

                 

                SQL> select * from jobs where job_id='DBA3';

                 

                JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY
                ---------- ----------------------------------- ---------- ----------
                DBA3 DBA 2000 10000

                 

                ggserr.log of source

                ====================

                2013-10-15 18:17:40 INFO OGG-01517 Oracle GoldenGate Capture for Oracle, ext1.prm: Position of first record processed Sequence 2671, RBA 17707536, SCN 0.55710193, Oct 11, 2013 8:41:02 PM.

                 

                infoall

                =======

                GGSCI (INCHOMDP005773) 153> info all

                 

                Program Status Group Lag at Chkpt Time Since Chkpt

                 

                MANAGER RUNNING
                EXTRACT RUNNING EXT1 00:00:00 00:00:03

                 

                Target DB
                ==========

                infoall

                ========

                 

                GGSCI (INCHOMDP005891) 22> info all

                 

                Program Status Group Lag at Chkpt Time Since Chkpt

                 

                MANAGER RUNNING
                REPLICAT RUNNING REP1 00:00:00 00:00:01

                 


                SQL> select * from jobs where job_id='DBA3';

                 

                JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY
                ---------- ----------------------------------- ---------- ----------
                DBA3 DBA 2000 10000

                 

                --upto this point it is fine, replication successfully completed.

                 

                SQL> update jobs set max_salary=12000 where job_id='DBA3'; -- deliberately tampering the data

                 

                1 row updated.

                 

                SQL> commit;

                 

                Commit complete.

                 

                SQL> select * from jobs where job_id='DBA3';

                 

                JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY
                ---------- ----------------------------------- ---------- ----------
                DBA3 DBA 2000 12000


                Original data in source :10,000

                Tampered data in target :12,000


                How this tampering of data in target can be avoided or tracked?



                • 5. Re: New to OracleGG..Need a clarification
                  Maheswar

                  hi ,

                   

                     if you did like what is meaning of primary and standby..???because both are not in sync.if you want to see same data in source as well ,please go to gg bi-directional configuration.if u dont want sync but you want tempered data as in target u can ignore by useing reperror parameters in replicator .so that replicator will run  without  abending whenever update came for this particulal row update.