You are here:--How to configure Oracle ODBC driver on CentOS/Redhat | MVSourceCode

How to configure Oracle ODBC driver on CentOS/Redhat | MVSourceCode

In this tutorial I will be configuring Oracle ODBC driver on CentOS/Redhat server and go true typical issues you might face and also explain how you can fix it.

I have Oracle database 11g running on the same Redhat server, if your database is running on a different server then you need to download and install Oracle Instant Client from Oracle web website and follow installation procedure.

If you have Oracle installed on the same CentOS/Redhat server then you can follow my steps in this guide.

You can apply the same troubleshooting steps for both scenarios.

Here are the steps.

  1. Configure Oracle ODBC Driver (odbcinst.ini)
  2. Configure Oracle ODBC Datasource (odbc.ini)
  3. Testing ODBC connection
  4. Troubleshooting error (Can’t open lib : file not found) 

1 Configure Oracle ODBC Driver (odbcinst.ini)

First we need to find where is Oracle ODBC shared library file is located.

Copy to Clipboard

Now we can open /etc/odbcinst.ini file and configure ODBC driver.

Copy to Clipboard

2 Configure Oracle ODBC Datasource (odbc.ini)

Open ODBC Datasources file /etc/odbc.ini and put your database information

Copy to Clipboard

3 Testing ODBC connection

You can test if all dependencies are installed using dltest command and verify connection using isql command

Copy to Clipboard

4 Troubleshooting error (Can’t open lib : file not found) 

If you get an error [01000][unixODBC][Driver Manager]Can’t open lib ‘/u01/app/oracle/product/11.2.0/dbhome_1/lib/libsqora.so.11.1’ : file not found is because missing symbolic link and is a know Red Hat issue.

You can check if all dependencies are installed and working using ldd command

Copy to Clipboard

From the screenshot above we can see an error libodbcinst.so.1 => not found. 

Now we need to locate libodbcinst and create symbolic link.

Copy to Clipboard

Retest everything again and it should work as expected.

By |2019-03-07T08:20:30+00:00March 7th, 2019|Categories: Linux|Tags: , , |0 Comments

Leave A Comment