Friday , July 19 2024

Create Dblink From Oracle To Postgresql Database

In today’s article, I will tell you how to Create Dblink From Oracle To Postgresql Database.

Using the dblink we will create, we can query a table in our Postgres database from the Oracle database.

Things to do in the Postgres database:

1.First we will create a user for dblink.

2. After creating the user, we authorize her according to which schema and table we want it to use.

3. Add the following line to the pg_hba.conf file.

4. After making the change, we reload the service.

Things to do in Oracle database:

1.First, we install the following package.

2. We edit the contents of the odbcinst.ini file according to the settings of our own postgres server.

3. Create the initPG.ora file in the ORACLE_HOME/hs/admin directory and add the following lines to it.

4. Add the following lines to the tnsnames.ora file.

5. Add the following lines to the listener.ora file.

6. Reload the Listener.

7. The dblink is created.


After doing all the steps, I will query a table in the Postgres database in the Oracle database to test it.



About Melek Durdu

One comment

  1. As for the connection to database, I use different tools such as bigcommerce connector, oracle connector etc. It depends on the databases.

Leave a Reply

Your email address will not be published. Required fields are marked *