Connecting to Informix using ODBC
Posted in 1998
I am trying to connect to Informix 7.2 using ODBC from an NT server with
Informix-CLI 2.5. When I try to connect, I receive an error number -908.
I reference the error number and found the following messages:
Attempt to connect to database server (servername,
conerr=connection-error-number, oserr=system-error-number) failed.
"The program or application is trying to access another database server but
has
failed. Note the server name in the current statement. Note also the
connection error number and/or system error number that is shown in the
message.
The desired database server is unavailable, or the network is down or is
congested. Ask your DBA and system administrator to verify that the server
and network are operational. If the network is congested, use the
environment variables INFORMIXCONTIME and INFORMIXCONRETRY to tune
connection timing. See Chapter 4 in the Informix Guide to SQL: Reference
for information on setting these environment variables."
I know that I am using the correct server name, but I don't know if I have
all the settings correct. Below is a list of things I have setup.
I. Network Setup
a. UNIX - added the NT host name and ip address in the hosts file
b. NT - added the UNIX host name and ip address to the host file
II. Services file
a. UNIX - setup services file with a service name and socket address
b. NT - placed same entry into services file on NT machine.
III. ODBC Setup
a. UNIX - added an the following entry in the "sqlhosts" file:
"altecwms onsoctcp altec1 online" where altecwms is the server name, onsoctcp is the protocol
name, altec1 is the UNIX server name, and online is the
service name defined in the etc/services file
b. NT - Ran the ODBC setup and added an ODBC connection using the
Informix CLI Driver
IV. Informix Setup
a. NT - setup the setnet32 utility.
1. set INFORMIXDIR = c:\\program files\\INFORMIX
2. set INFORMIXSERVER = altecwms (matches the name of the
environment variable on the UNIX server)
3. setup the server and host information.
I am fairly confident that everything that I have done is correct, however
it still doesn't work. Therefore, either I have not done something right,
or I have skipped something. If anyone can help me, please email me at
skmills@tfs.net. Thanks. Kent Mills