Installation Guide: OpenLink Informix ODBC Connector (Driver) for Linux (Lite Edition)

This installation guide walks you through the installation of the Lite Edition ODBC Driver for Informix to a Personal or Application Server host functioning as a client to an Informix Database Server.

Informix Lite Edition Architecture

Step 1: Download the Installer Archive

  1. Visit the OpenLink ODBC Lite Edition Driver Download Page to download the appropriate ODBC driver for Informix.

  2. Alternatively, curl can be used to download the installer archives and install.sh script directly:

    curl -O https://download3.openlinksw.com/uda/components/misc/install.sh
    curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/inf11_lt.taz  
    curl -O https://download3.openlinksw.com/uda/components/9.0/x86_64-generic-linux-glibc25-64/odbc_admin.taz
    

Step 2: Pre-Installation Configuration

Software Requirements
  • If not already in place already, the Informix native client/sdk software must be installed on the same machine as the OpenLink Lite Edition Informix ODBC Driver for Linux (inf11_lt).
Informix Client Configuration Requirements
  1. The environment variable INFORMIXDIR points to the home directory of the Informix installation client and/or server.
  2. Edit the file $INFORMIXDIR/etc/sqlhosts to determine the configuration of available Informix Database server instances.
  3. Typical entries are of the form:
<INFORMIXSERVER>     <protocol>     <hostname or IP address>     <service name or port number>

for example:

ol_informix1410    onsoctcp    54.172.89.18    27669/tcp

Step 3: Installation

  1. Log onto the target machine for the installation and create a suitable OpenLink installation directory {OPENLINK_INSTALL}.

  2. Copy all the downloaded components to the {OPENLINK_INSTALL} directory, which are the install.sh, odbc_admin.taz, inf11_lt.taz files.

  3. Install OpenLink components using the install.sh shell script with the command –

 sh install.sh
  1. Take care to enter correct information when prompted pertaining to ports, passwords, etc and ensure that you note these down for future use.

  2. The installation should finish without error.

Step 4: Configuration
  1. Open the file {OPENLINK_INSTALL}/openlink.sh with a suitable text editor such as vi.
  2. Locate the LD_LIBRARY_PATH shared library environment variable setting and set to point the location of the required Informix shared libraries replacing the {INFORMIXDIR} place holder with the actual INFORMIXDIR environment variable for the Informix installation –
LD_LIBRARY_PATH = {INFORMIXDIR}/lib:{INFORMIXDIR}/lib/esql:$LD_LIBRARY_PATH
  1. To setup the OpenLink environment, from the {OPENLINK_INSTALL} run the command –
. ./openlink.sh
  1. Open the file {OPENLINK_INSTALL}/bin/openlink.ini with a suitable text editor such as vi.
  2. Locate the [Environment Informix 11] section for setting with the driver specific Informix configuration and edit to reflect your Informix installation, replacing the {INFORMIXDIR} and {INFORMIX_SERVER} place holders with the actual INFORMIXDIR and INFORMIX_SERVERenvironment variable for the Informix installation, determined in Step 2
[Environment Informix 11]
INFORMIXDIR        = {INFORMIXDIR}
INFORMIXSERVER     = {INFORMIX_SERVER}
DELIMIDENT         = Y  ; Allow quoted identifiers
OPL_INF_MULTISESS  = Y  ; Allow multiple sessions
OPL_SPACEPADCHAR   = Y  ; Pad CHAR fields with spaces
CURSOR_SENSITIVITY = LOW        ; Set to HIGH after loading oplrvc.sql
FORCE_DORMANT      = 1  ; Set connection dormant after call
;FET_BUF_SIZE           = 65535         ; Size of the fetch buffer
;FORCE_ONLINE_DATABASE  = 1             ; Force mode to (0) SE or (1) ONLINE
;CLIENT_LOCALE          = EN_US.UTF8    ; Unicode connection
  1. Place the License file (inf11_lt.lic) either purchased or obtain during the evaluation download process in the {OPENLINK_INSTALL}/bin directory.
  2. Start the OpenLink License Manage (oplmgr) by going to the {OPENLINK_INSTALL}/bin directory and running the command –
./oplmgr +start

Step 5: ODBC Data Source

  1. Open the file {OPENLINK_INSTALL}/bin/odbc.ini with a suitable text editor such as vi.

  2. Locate and edit the sample OpenLink Informix 11 ODBC data source (DSN) called [inf11_lite_unicode] created during the installation process and edit as follows –

[inf11_lite_unicode]
Driver          = {OPENLINK_INSTALL}/lib/inf11_mt_lu.so
ServerType      = Informix 11
Database        = stores_demo
Username        = informix
Password        = **********
Options         = {INFORMIXSERVER}
FetchBufferSize = 99
ReadOnly        = no
DeferLongFetch  = no
JetFix          = no
Description     = Sample Informix Lite Connection

Replace {INFORMIXSERVER} with the value of the Informix Server name determined in Step 2 above.

Step 6: Test connection

Using the iODBC Runtime Environment
  1. Use the OpenLink iODBC iodbctest sample tool packaged with the HTTP-based OpenLink ODBC Administrator as follows to make a test connection –
$ cd {OPENLINK_INSTALL}
$. ./openLink.sh 
$ iodbctest "DSN=inf11_lite_unicode;UID=informix;PWD=xxxxxxxx"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0507.0105
Driver: 08.02.1217 OpenLink Generic ODBC Driver (oplodbc.so) 

SQL>
  1. SQL statements can now be issued directly against the target database from the SQL> prompt –
SQL> select count(*) from orders

(count(*))       
-----------------
23               

 result set 1 returned 1 rows.

SQL>
  1. The Informix ODBC Driver is now ready for use with target ODBC application(s).
Using the unixODBC Runtime Environment
  1. When using the unixODBC Driver Manager the WideAsUTF16 = Y parameter needs to be added to the target ODBC DSN to enable successful connections with applications built using the unixODBC SDK, e.g., its isql test application –
$ isql inf11_lite_unicode informix xxxxxxxx
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| echo [string]                         |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from orders              
+------------------+
| (count(*))       |
+------------------+
| 23               |
+------------------+
SQLRowCount returns -1
1 rows fetched
SQL>

Additional Information