The client-server connection

The Informix® ESQL/C application can establish a connection to any valid database environment. A database environment can be a database, a database server, or a database and a database server.

Every database must have a database server to manage its information. To establish connections, the client application must be able to locate information about the available database servers. This information is in the sqlhosts file or registry. At run time, the application must also be able to access information about environment variables relevant for connection. The following environment variables are accessed:
INFORMIXCONTIME
Defines a limit in seconds within which the client must establish a server connection
INFORMIXCONRETRY
Defines a limit on connection attempts (after an initial failure) within the INFORMIXCONTIME limit
INFORMIXSQLHOSTS
Defines where to find the sqlhosts information. The sqlhosts information contains a list of valid database servers that the client can connect to, the type of connection to be used, and the server machine name on which each database server is. On a UNIX operating system, this is a path to a file. In a Windows environment, this is the name of the machine on the network that contains the central registry which is accessible to the client application.
INFORMIXSERVER
Specifies the name of the default database server that the client connects to. This value identifies which entry in the sqlhosts file or registry to use to establish the database connection.
Important: The client application connects to the default database server when the application does not explicitly specify a database server for the connection. You must set the INFORMIXSERVER environment variable even if the application does not establish a connection to the default database server.

The client also sends environment variables so that the database server can determine the server-processing locale. For more information about how the database server establishes the server-processing locale, see the Informix® GLS User's Guide.

The database server uses appropriate environment information when it processes the application requests. It ignores any information that is not relevant. For example, if the application sends environment variables for a database with Asian Language Support (ALS), but it connects to a non-ALS database, the database server ignores the ALS information.

For information about how to set environment variables, see the Informix® Guide to SQL: Reference for your operating system.