Oracle to MySQL Heterogeneous Unidirectional Replication

Oracle to MySQL Heterogeneous Unidirectional Replication

In this article we will see how to make Heterogeneous Unidirectional Replication between Oracle and  MySQL.

SourceOracle DB

Target :  MySQL

Download Goldengate Binaries 

Download GoldenGate binaries from using below link(Oracle)

Make sure that you are using the correct OS version of binaries.


Setting bash_profile

Export the path in the bash profile

vi  .bash_profile

Run the bash_profile file

Check instance info :

Create directory for gg home :

Create directory fo gghome

Copy the downloaded file to /opt location  Using Winscp

Unzip GoldenGate Software :

Check file in /opt dir :

Now do runinstaller as Oracle user :

[oracle@gg1 Disk1]$ ./runInstaller

Starting Oracle Universal Installer…

Checking Temp space: must be greater than 120 MB.   Actual 3551 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 7999 MB    Passed

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-06-04_06-23-03PM. Please wait …

On step 1 choose version of your oracle software 

Click on Next

Browse  location for GG_HOME

Start Manager with any port number

Click on Next

Check summary

Click on Install

Installation will start

Finally GG will successfully installed on GG1

Click on Close 

Goto GGS_HOME and connect to ./ggsci

Give info all to check manager process is running or not

Open New terminal for SQL prompt  Source database:

Connect to database and create user and tables

Enable the parameter for GoldenGate replication

Create admin for GoldeGate

Now execute below Package for additional privs

Add supplemental logdata on columns

Check archive-log enabled or not

On  GGSCI terminal (GG1) :

Login with user credentials(ggadmin)

Add Trandata on which table you want to perform replication

Add extract using below command

Register extract process on database

Now add Exttrail file

Add datapump process

Add Remote trail file

Check info all

Two more extract process will added

Create wallet and add credentialstore  to make aliasname for userlogin

From now user can able to login with alias-name called ggadmin_src

Edit the parameter for extint

Edit the parameter for dpint

Check info all

Start both params extint and dpint


Now do insert operation on  ktexperts

Check extract and datapump process collecting stats or not

Check datapump process Stats

Everything is fine at Source side now we will do Target (MySQL)



Starting on the MySQL database server, mysql1, install the GoldenGate software.

Start the MySQL 

Check MySQL is riunning or not

Check MySQL server status

Connect to MySQL and check the databases.

set the Bash_profile

Run the bash_profile

Edit my.cnf  file and add the following parameters

Now copy GoldenGate software into /opt

Unzip the S/W file

untar the file

Run the ./ggsci command and create sub directories

Check manager sunning or not , If not start the Mgr after specifying the port

Connect as Root user  and create users

Create database

Connect to oggdb1 and create objects

Create unique index on dept table

Connect to GGSCI on the MySQL server and create the replicat . Also, note that the parameters point to the target (MySQL) database.

Login as oggadm1

Add checkpoint table 

Add replicat process 

Edit the param file for replicat

Start the replicat  process

Check Stats of REP1

Connect to MySQL and check records

Yes   Heterogeneous Unidirectional Replication between Oracle to MySQL was working fine.

In the same way perform all DML transactions at Source and check and Target.


Thank you for giving your valuable time to read the above information.

Follow us on 

Facebook  KTExperts


My Linkedin :


Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)

Add Comment