Linux ODBC: IBM Informix ODBC Driver

Note that the bundled SQDR Informix driver is recommended in most situations, but the IBM Informix driver can be also be used.

Installation

Download the IBM CSDK (Client SDK) e.g. ibm.csdk.4.50.FC7.LNX.tar from IBM.

Expand the tar file.

The installer (created with InstallAnyWhere) can be run either in a GUI environment or in text-only mode.

Using text-mode installation requires installing ncurses:

# yum install ncurses-compat-libs

During installation, you will be asked to choose between GSKit and OpenSSL for SSL connectivity. If you plan to use SSL, choose the SSL implementation that you are most familiar with.

sqlhosts

create /opt/IBM/Informix_Client-SDK/etc/sqlhosts from the examples:

e.g.
ol_informix1410 olsoctcp        myhost 9088

Environment Variables

Set the following environment variables when starting the SQDR service:

export INFORMIXDIR=/opt/IBM/Informix_Client-SDK

add /opt/IBM/Informix_Client-SDK/lib/esql to LD_LIBRARY_PATH

/etc/odbcinst.ini

Add the following to /etc/odbcinst.ini.

[IBM INFORMIX ODBC DRIVER (64-bit)]
Driver=/opt/IBM/Informix_Client-SDK/lib/cli/iclit09b.so
Setup=/opt/IBM/Informix_Client-SDK/lib/cli/iclit09b.so
APILevel=1
ConnectFunctions=YYYDriverODBCVer=03.51
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y

[IBM INFORMIX ODBC DRIVER]
Driver=/opt/IBM/Informix_Client-SDK/lib/cli/iclit09b.so
Setup=/opt/IBM/Informix_Client-SDK/lib/cli/iclit09b.so
APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.51
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y

$HOME/odbc.ini

Add the following to $HOME/.odbc.ini (of the user that the service is running as e.g. /home/sqdr/.odbc.ini).  This must exist even if you are using a connection string. Adding it to /etc/odbci.ini does not work.

$HOME/.odbc.ini:

[ODBC]
UNICODE=UCS-2

Sample DSN

[inf123]
Driver=IBM INFORMIX ODBC DRIVER (64-bit)
Host=myhost
Service=9088
Protocol=olsoctcp
Database=stores_demo
DELIMIDENT=Y
Server=ol_informix1410

(where ol_informix1410 has been defined in etc/sqlhosts)

Known Issues

If you choose to use a DSN rather than a connection string, it must exist as a user DSN (in $HOME/.odbc.ini).

Attempting to use a system DSN (in /etc/odbc.ini) will fail with the error:

[IM002][unixODBC][Informix][Informix ODBC Driver]Data source name not found and no default driver specified.