Connecting to Informix using Informix-CLI
Posted in 1995
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET, Server Administration, Networking & sqlhosts Configuration, Platform-Specific Issues
I am new to informix and need a bit of help with getting SQLConnect to
connect to my database. I have an Informix-OnLine server running on
Sun Solaris 2.4 and I will also be running my applications from the same machine.
I am trying to run the adhoc.c sample program that comes with
Informix-CLI. I got it compiled ok. When it askes me for a data
source name I don't know what I'm supposed to put. I have tried all
sorts of combinations, such as dap_online, dap_logs,
dap_logs@dap_online, etc. I realize that when I try a new combination
that it means I probably have to make a change in the .odbc.ini file.
I can get connected to dap_online using the dbaccess tool. I have set
up several databases for dap_online as follows:
dap_logs@dap_online
dap_nolog@dap_online
stores7@dap_online
sysmaster@dap_online
test@dap_online
My environment is setup as follows:
ONCONFIG=onconfig.dap
INFORMIXDIR=/export/u1/home/informix
INFORMIXSERVER=dap_online
My sqlhosts files has the following entry:
dap_online onipcshm snapper xyz
===========================================================================
My .odbc.ini file is in the informixdir directory is as follows:
[ODBC Data Sources]
dap_online=Informix CLI
dap_logs=Informix CLI
[dap_online]
Driver=/export/u1/home/informix/odbc/lib/libifmx07.so.1
Description=
Database=dap_online
[dap_logs]
Driver=/export/u1/home/informix/odbc/lib/libifmx07.so.1
Description=
Database=dap_logs@dap_online
[ODBC]
Trace=1
TraceFile=~/odbctrace.out
InstallDir=/export/u1/home/informix/odbc
===========================================================================
My odbcinst.ini file is in the informixdir directory is as follows:
odbcinst.ini:
[ODBC Drivers]
Informix CLI=Installed
[Informix CLI]
Driver=/export/u1/home/informix/odbc/lib/libifmx07.so.1
I hope this is just a simple configuration problem I am having.
Thank you in advance for any help.
Mary Hunt