Being a  DBA we are must aware of replication in DATA field.  In this tutorial, we will explain how to do schema replication in goldengate. Schema replication means, replicating all the tables of a schema. This table explains about the HOST IP, DB_NAME, Goldengate Process, SCHEMA To Replicate. All steps mention the way to replication in goldengate.

 SOURCE TERGET
 HOST IP 192.168.0.1 192.168.0.2
DB_NAME ORCLSRC ORCLTRG
GG Process EXT_ORCL (extract)

EXT_ORCLP((extract pump)

REP_ORCL(replicat)
SCHEMA TO REPULICAT SCOTT.* SCOTT.*

1. In the first step add supplemental for all tables of a schema on the source side

add trandata <schema_name>.*

2. Prepare extract file for source

3. Prepare extract pump parameter file [ SOURCE ]

4. Add extract process [SOURCE]

5. Add the extract trail [SOURCE]

6. Add the extract pump process [SOURCE]

7. Add remote trail [SOURCE]

8. Prepare replicat file [ TARGET ]

Here we have to add HANDLECOLLISION parameter to resolve conflicts for the transactions during initial loading. We will remove this parameter once the lag is cleared after initial loading.

9. add the replicat process [ TARGET ]

10.Start the extract and pump process [ SOURCE ]

Program Status Group Lag at Chkpt Time Since Chkpt

11. Initial loading:

Now export this schema using expdp in the source database and import in the target database.

— SOURCE DB

— TRANSFER THE DUMP TO TARGET SERVER:

— -IMPORT IN TARGET DATABASE:

12. Start the replicat: [ SOURCE ]

Use LAG command to monitor the lag at replicat.

As lag is zero now, Remove the handles collision parameter and restart the rreplicate

13. Remove handlecollison parameter and restart replicat[ TARGET ]

goldengate Schema replication has been completed.

About The Author

Comments

  1. Pingback: Schema replication using oracle goldengate - SSWUG.ORG

  2. Vivek Raghavan

    It is better to take the export of the source database with the flashback scn and start the replicat with aftercsn to avoid duplication on the target server which was a part of the import. This will eliminate the use of handlecollisions in the replicat parameter file to handle duplicates.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.