Oracle Database - ODBC Driver Insallation on Linux


How to install the ODBC Driver of Oracle on Linux (unixODBC)


Driver manager installation

Install driver manager: ODBC - Driver Manager

Prerequisites: Verify the driver manager version.

Instant Client Version (unixODBC|Driver Manager) version
12c 2.3.1
11c 2.2.11 (or 2.2.14 for Linux 64bit)

See Oracle Instant Client ODBC Release Notes

Download (driver shared library)


  • (provides the core)
  • (provides sqlplus)
  •, (provides odbc)
  • (for dev, not needed ??)

in a temp directory. Example: /u01/app/oracle/

and unzip them

unzip *.zip

The ODBC driver shared library file are:

  • For 12c:
  • For 11g:

Add the library in the library path

Add the library in the ld_library_path

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u01/app/oracle/instantclient_11_2

Define the TNS_ADMIN environment variable

Test Oracle Driver installation

dltest /u01/app/oracle/instantclient_11_2/
#SUCCESS: Loaded /usr/lib/oracle/11.2/client64/lib/

file not found ?

If it doesn't work with [dltest] ERROR dlopen: file not found you miss a dependency library in your LD_LIBRARY_PATH. You can see it with the ldd tool

ldd /u01/app/oracle/instantclient_12_1/
  • The is not found. =>  (0x00007fff165ff000) => /lib64/ (0x00007f3e7a549000) => /lib64/ (0x00007f3e7a2c5000) => /lib64/ (0x00007f3e7a0aa000) => /lib64/ (0x00007f3e79e92000) => /lib64/ (0x00007f3e79c88000) => /u01/app/oracle/instantclient_12_1/ (0x00007f3e76ccb000) => not found => /lib64/ (0x00007f3e76972000)
        /lib64/ (0x00000035bb600000) => /u01/app/oracle/instantclient_12_1/ (0x00007f3e766fc000) => /u01/app/oracle/instantclient_12_1/ (0x00007f3e7637e000) => /u01/app/oracle/instantclient_12_1/ (0x00007f3e75c73000) => /u01/app/oracle/product/fmw/Oracle_BI1/lib/ (0x00007f3e75b3a000) => /usr/lib64/ (0x00007f3e75939000) => /u01/app/oracle/instantclient_12_1/ (0x00007f3e753c6000)

Create the appropriate and links for the version of Instant Client

cd /u01/app/oracle/instantclient_11_2 # Install dir
ln -s
ln -s

Add the ODBC configuration

Oracle provides an utility to do it for you: <ODBCDM_Home> [<Install_Location> <Driver_Name> <DSN> <ODBCINI>]


  • ODBCDM_Home unixODBC driver manager home directory path (Mandatory)
  • Install_Location* Oracle Instant Client directory path. Default path is current directory (./)
  • Driver_Name* Driver name to identify the Oracle ODBC driver resides in current Oracle Instant Client home. Default name is “Oracle 12c ODBC driver” for Oracle 12c Instant Client
  • DSN* Sets ODBC DSN name. Default name is “OracleODBC-12c” for Oracle 12c Instant Client
  • ODBCINI* Directory path of the .odbc.ini file. The default path is the user's home directory (~/.odbc.ini)


# located in the odbc oracle download file. First unzip
sudo ./ "/usr/local"

It will update:

  • <DM-HOME>/etc/odbcinst.ini where DM-HOME is the data manager home (locate odbcinst)
  • and ~/.odbc.ini



cat /usr/local/etc/odbcinst.ini
[Oracle 11g ODBC driver]
Description     = Oracle ODBC driver for Oracle 11g
Driver          = /u01/app/oracle/instantclient_11_2/
Setup           =
FileUsage       =
CPTimeout       =
CPReuse         =


cat ~/.odbc.ini
  • Minimal parameters
Driver = /u01/app/oracle/instantclient_12_1/
ServerName = TNS_NAME
  • Complete:
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = Oracle 11g ODBC driver
DSN = OracleODBC-11g
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MaxLargeData = 0
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName =
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
DisableRULEHint = T
UserID =

Test it

with unixODBC - isql

isql -v OracleODBC-11g


undefined symbol: SQLGetPrivateProfileStringW

You may get the following:

isql: symbol lookup error: /u01/app/oracle/instantclient_11_2/ undefined symbol: SQLGetPrivateProfileStringW

This is normally because the driver manager (unixODBC) version is not compatible with the ODBC driver. Verify the #driver manager version needed for the oracle ODBC database version.

See below how to search for a symbol:

  • Symbol lookup
nm -A /u01/app/oracle/instantclient_11_2/ | grep SQLGetPrivateProfileStringW
/u01/app/oracle/instantclient_11_2/                U SQLGetPrivateProfileStringW

SQLGetPrivateProfileStringW is defined in the last and

nm -A /usr/lib/ | grep SQLGetPrivateProfileStringW

Documentation / Reference

Powered by ComboStrap