An organization have lot of choices to choose from the RDBMS world. Oracle Database, Microsoft SQL Server, IBM DB2,PostgreSQL, MySQL are few of them. Most of the organizations out there do have a mix of all these which are used to store their data and in course of time it is inevitable that they would want to transfer data from ‘this database’ to ‘that database’. Oracle, the uncrowned king of this RDBMS world call this “Heterogeneous Connectivity” and have incorporated this facility into their database and this is installed by default.

The steps are:

  • Install Oracle Transparent Gateway for MySQL
  • Create the ODBC data source
  • Configure the gateway initialization parameter file
  • Configure the listener
  • Configure the Oracle database tnsnames.ora
  • Creating DB link from Oracle database to MySQL Server

Step 1 :

Create System DSN for MySQL:

Go to Control Panel > Administrative Tools > ODBC Data Sources

Select MySQL odbc driver and Click on Add Button

Click On Finish

Add Data Source Name and MySQL server credentials :

Click OnTest Button :

Step 2 :
Now go to cd $ORACLE_HOME\hs\admin\
Update following lines to initdg4odbc.ora file :

Step 3 :
Add following lines to listener.ora file :

Step 4 : Restart listener

Step 5 :Check listener status

Append following lines to TNSNAMES.ora file :

Check tnsping :

Create a Database link using above mentioned tnsname entry and MySQL Credential :

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

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn:

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAASFacebook Page: OracleHelp

Leave a Reply

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