- Add Data Looping Prevention to the Extract
- Create the Replication for the Other Direction
1. Add Data Looping Prevention to the Extract
As we know, there are three approaches to preventing data looping in Oracle GoldenGate [1] :
- Using TRANLOGOPTIONS EXCLUDEUSER (DB2 LUW, DB2 z/OS, Oracle, Sybase) or EXCLUDEUSERID (Informix, Oracle)
- Using TRANLOGOPTIONS EXCLUDETAG (Oracle DB only, Recommended for integrated replications between Oracle DBs)
- Using TRANLOGOPTIONS FILTERTABLE (MySQL to MySQL replication Only)
extract extgdrds useridalias awsuser EXTTRAIL ./dirdat/rd, format release 12.1 ddl include all ddloptions addtrandata, report tranlogoption excludetag 00 TABLE awsuser.*;
In cloud, you need to create a SOCKS5 proxy +SSH Tunneling on the GGCS source machine before sending data over the public network. Please refer to Creating a One-Way Replication from On-Premises to Cloud with GGCS (11g) for the details. In the following example, the SOCKS5 proxy is setup to be 127.0.0.1:9000. The configurations of the extract, pump and replicat are shown as follows:
Extract Parameter File (extin.prm):
extract extin useridalias ggadmin exttrail ./dirdat/in tranlogoptions excludetag 00 ddl include all ddloptions addtrandata, report table tpcadb.*;
add extract extin integrated tranlog, begin now add exttrail ./dirdat/in extract extin register extract extin database start extgdrds
Pump Parameter File (pmpin.prm)
extract pmpin rmthost 52.201.221.71, mgrport 7865,socksproxy 127.0.0.1:9000 discardfile ./dirrpt/pmpin.dsc, purge rmttrail ./dirdat/in passthru table tpcadb.*;
add extract pmpin exttrailsource ./dirdat/in add rmttrail ./dirdat/in extract pmpin
Replicat Parameter File (repgdrds.prm):
replicat repgdrds useridalias awsuser dboptions integratedparams(parallelism 2) discardfile ./dirrpt/repgdrds.dsc,append megabytes 50 ddl include all assumetargetdefs map tpcadb.*, TARGET awsuser.*;
dblogin useridalias awsuser delete repgdrds ADD REPLICAT repgdrds INTEGRATED EXTTRAIL ./dirdat/in
After all these configurations, you can start the bi-direction replication.
- Preventing the Capture of Replicat Operations, Oracle GoldenGate 12.2 Documentation