SQLines Data - Configure and Troubleshoot Connection to Informix

If you are going to connect to a localhost Informix database you do not need to setup any additional libraries to use SQLines Data tool as they are supplied with Informix server.

If you need to connect to a remote Informix database, you need to have Informix Client SDK (Informix CSDK) installed in your system.

Note. SQLines Data tool connects to Informix ODBC/CLI library directly, it does not require unixODBC on Linux, or ODBC Manager on Windows.

Before downloading check if you already have required Informix libraries:

  • Linux:
    • $INFORMIXDIR/lib/cli/iclit09b.so
      • /opt/IBM/informix/lib/cli/iclit09b.so
      • /opt/informix/ids100/lib/cli/iclit09b.so
      • /usr/local/informix/lib/cli/iclit09b.so
      • /apps/informix/lib/cli/iclit09b.so
  • Windows: (Drive letter and version can be different)
    • C:\Program Files\Informix Client-SDK\bin\iclit09b.dll
    • C:\Program Files\IBM\Informix\11.70\bin\iclit09b.dll

If Informix client is not available in your system, ask your DBA or go to IBM website, download and install Informix CSDK for your Informix server version. You can try the following links (IBM Login is required):

Informix SDK - 32-bit and 64-bit Versions

Make sure that Informix SDK platform corresponds to SQLines Data platform i.e. if you use SQLines Data 64-bit version then Informix SDK must be also 64-bit version.

Check Informix SDK setup code:

  • F = 64-bit on AMD AMD64, Intel EM64T i.e. clientsdk.4.10.FC8DE
  • T = 32-bit on any Windows platform i.e. clientsdk.4.10.TC9DE

Installing Informix Client SDK on Linux

Download the Informix CSDK software from IBM web site, for example clientsdk.4.10.FC8DE.LINUX_x64.tar. Extract the files and run installation:

  tar xvf clientsdk.4.10.FC8DE.LINUX_x64.tar
  ./installclientsdk

Set the $INFORMIXDIR environment variable, for example:

 export INFORMIXDIR=/opt/IBM/informix

You can find iclit09b.so library under $INFORMIXDIR/lib/cli/ directory. Add Informix library locations to LD_LIBRARY_PATH as follows:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql

Troubleshooting Connection on Linux

When running the SQLines Data tool you can get the following errors:

  • Error: iclit09b.so: cannot open shared object file: No such file or directory

Check that $INFORMIXDIR/lib/cli is included to $LD_LIBRARY_PATH.

  • Error: libifgls.so: cannot open shared object file: No such file or directory

Check that $INFORMIXDIR/lib/esql is included to $LD_LIBRARY_PATH.

  • Error: [Informix][Informix ODBC Driver][Informix]Sqlhosts file not found or cannot be opened.

Check that the file $INFORMIXDIR/etc/sqlhosts file exists and contains connection information.

  • Error: [Informix][Informix ODBC Driver][Informix]Server ol_informix1170 is not listed as a dbserver name in sqlhosts

Check the content of $INFORMIXDIR/etc/sqlhosts, it should include the connection information for the Informix server you want to connect to. For example,

  # file /opt/IBM/informix/etc/sqlhosts
  
  #dbserver             protocol     host          port
  ol_informix1170    olsoctcp     10.0.2.2    14318

Troubleshooting Connection on Windows

When you click Test Connection you can get the following error:

  • Error loading Informix library iclit09b.dll. The specified module could not be found

Possible reasons:

  • Informix Client SDK is not installed. Download and install Informix client (see information above)
  • Informix Client SDK is installed but SQLines Data tool cannot find iclit09b.dll for some reason. Add the directory where iclit09b.dll is located (for example, C:\Program Files\IBM\Informix\11.70\bin) to the PATH environment variable and restart SQLines Data tool.

To set the PATH variable on Windows, right-click the Computer icon, select Properties, click the Advanced System Settings. Then select Advanced tab and click the Environment Variables button. Go to System Variables, find and append Path.

  • Server <servername> is not listed as a dbserver name in sqlhosts

Possible reason and actions:

  • You have Informix Client SDK installed, but the connection to a remote Informix server is not configured yet
  • Run Setnet32 utility supplied with Informix Client SDK and specify Server Information with parameters defined at the Informix server host.

    You can request this information from your Informix DBA or run Setnet32 at the Informix server host to see the settings.

In the example above, Service Name specifies the Informix server listening port.

How to find the protocol and port for your Informix server:

  • Windows
    • Open the registry and find HKEY_LOCAL_MACHINE\SOFTWARE\INFORMIX\SQLHOSTS key. You can see PROTOCOL and SERVICE there. If SERVICE specifies a name (not a port number), open C:\Windows\System32\drivers\etc\services file, find this service name and associated port number.
  • Database locale information mismatch

Possible reason and actions:

Informix ODBC driver ignores CLIENT_LOCALE options set in SETNET32 and environment variables, so you have to set the -informix_client_locale option in sqldata.cfg file or command line to specify which client locale to use for the connection to Informix.

Example:

  -- CLIENT_LOCALE=en_US.819 will be set for the connection
  -informix_client_locale=en_US.819

Mixing 32-bit and 64-bit Informix SDK on 64-bit Windows

Instead of \etc\services file you can also check the Windows Registry and set appropriate settings: \HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SQLHOSTS\ for 64-bit SDK and \HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Informix\SQLHOSTS\ for 32-bit SDK.