Connecting to an Oracle database v16

To enable Oracle connectivity, download Oracle's freely available OCI drivers from their website.

For Linux, if the Oracle instant client that you downloaded doesn't include the library, you must create a symbolic link named that points to the downloaded version. Navigate to the instant client directory and execute the following command:

ln -s<version>

Where version is the version number of the library. For example:

ln -s

Setting the environment variable

Before creating a link to an Oracle server, you must direct EDB Postgres Advanced Server to the correct Oracle home directory. Set the LD_LIBRARY_PATH environment variable on Linux or PATH on Windows to the lib directory of the Oracle client installation directory.

Setting the oracle_home configuration parameter

Alternatively, you can set the value of the oracle_home configuration parameter in the postgresql.conf file. The value specified in the oracle_home configuration parameter overrides the LD_LIBRARY_PATH environment variable in Linux and PATH environment variable in Windows.


The oracle_home configuration parameter provides the correct path to the Oracle client, that is, the OCI library.

To set the oracle_home configuration parameter in the postgresql.conf file, edit the file and add the following line:

oracle_home = 'lib_directory'

In place of <lib_directory>, substitute the name of the oracle_home path to the Oracle client installation directory that contains in Linux and oci.dll in Windows.

Restarting the server

After setting the oracle_home configuration parameter, you must restart the server for the changes to take effect. Restart the server:

  • On Linux, using the systemctl command or pg_ctl services.

  • On Windows, from the Windows Services console.