Search:  
Gentoo Wiki

Informix

Informix is a family of relational database management system (RDBMS) products by IBM.

Contents

Required Packages

emerge unixODBC

IBM Informix CSDK

Download the SDK from IBM's website IBM Informix Downloads. While it is downloading. Start setting up the required user and group accounts.

groupadd informix ; useradd -g informix -d /dev/null informix

Untar the file (I downloaded the x86_64 version of the CSDK, file names may differ)

tar -xvf clientsdk.3.50.FC1DE.LINUX.tar

This produces four files, csdk.ini, csdk.jar, doc (dir), and installclientsdk. Run the installer.

./installclientsdk

I accepted all of the default settings throughout the installation process.

Configuration

There are five files that need to be modified. Please note that a lot of the settings in sqlhosts and /etc/services will probably satisfy your particular requirements. Please consult the installation guide of your informix server in order to determine the proper settings.

Setting up environment variables

File: /etc/env.d/99informix

INFORMIXDIR=/opt/IBM/informix
PATH=/opt/IBM/informix/bin
ODBCINI=/etc/unixODBC/odbc.ini
INFORMIXSERVER=name_of_informix_server
LDPATH="/opt/IBM/informix/lib
/opt/IBM/informix/lib/esql
/opt/IBM/informix/lib/cli
/opt/IBM/informix/lib/client"

Then run the following:

/sbin/ldconfig
env-update && source /etc/profile

sqlhosts

Edit to contain File: /opt/IBM/informix/etc/sqlhosts

#dbserver       nettype         hostname/IP     service_name
SERVER_NAME     sesoctcp        192.168.1.10    se_soc_tcp

services

Append your services file to contain the services_name listed above followed by the port and protocol type. File: /etc/services

se_soc_tcp      10000/tcp

ODBC Configurations

ODBC Driver

File: /etc/unixODBC/odbcinst.ini

[ODBC Drivers]
IBM INFORMIX ODBC DRIVER=Installed

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

ODBC Database Management

File: /etc/unixODBC/odbc.ini

[ODBC Data Sources]
informix_db=IBM INFORMIX ODBC DRIVER
[informix_db]
Driver=IBM INFORMIX ODBC DRIVER
Description=Description for your IBM Informix DB
Database=database_name
LogonID=username
pwd=password
Servername=SERVER_NAME

Testing

Connect to your database using the following command

isql -v informix_db

Troubleshooting

Database not found

Depending your particular installation of Informix; you may to specify the absolute path the database, instead of just the name of the database. You will get an error similar to this if the database is not properly specified

[Informix][Informix ODBC Driver][Informix]Database not found or no system permission.

If that is the case then change your Database line in odbc.ini to reflect the exact location.

Database=/path/to/database_name

Missing Libraries

Chances are, your LDPATH isn't completely set up. Use ldd to determine which libraries aren't accessible.

# ldd /opt/IBM/informix/lib/eqsql/libifgls.so

Resources

Retrieved from "http://www.gentoo-wiki.info/Informix"

Last modified: Fri, 05 Sep 2008 20:50:00 +0000 Hits: 756