The sqlhosts configuration file contains information about how client applications connect to the database server over the network.

1 etc/sqlhosts

IBM IDS comes standard with the template file sqlhosts.std

Copy it with the name sqlhosts (without extension):

cd /home/informix/etc
cp sqlhosts.std sqlhosts

And edit it:

vi sqlhosts

The file consists of 4 columns:

dbservername nettype hostname servicename


The INFORMIXSERVER does not allow the dash (-) character.

In a basic installation the following lines:

dbservername nettype hostname servicename
<dbservername> onipcshm <hostname> on_<hostname>
ol_<dbservername> onsoctcp <hostname> sqlexec
ol_<dbservername>_hdr onsoctcp <hostname>_hdr sqlexec

Where both <dbservername> and <hostname> it is recommended that they be the host name.

The first line corresponds to the access to the server via shared memory from the host itself, with DB-Access for example.

The second line is for the socket connection via TCP / IP protocol from a client application, such as Axional Server.

And the third would be for connection to a secondary server in case you want HDR replication.

Service name

The port number of service sqlexec it is mapped at /etc/services file. In the latest OS Linux version is defined to 9088. You can set the number of port at the sqlhosts file instead of service name. If there is a Firewall, it must be allow TCP connections to the port 9088.

Once the sqlhosts file has been edited, change the owner and group to informix.

chown informix:informix sqlhosts