Adding computers and protocols to the sqlhosts files

Local and remote access to the database server is supported by database server entries in the sqlhosts files.

About this task

To support both local and remote access to the database server, the ccmsrv create command creates the following two database server entries in the $CCM_HOME/informix/etc/sqlhosts file:

dbservername nettype hostname dbservername

dbservername_net nettype hostname servicename

The first type of entry is for a local connection (for example, a local connection for an engine and a database server in the same computer). The second type of entry is for a remote (_net) connection through sockets using TCP/IP. For example, this entry is for a network connection to an engine on a remote computer.

For example, marathon is connected as marathon using a shared memory protocol (onipcshm), and as marathon_net using a Solaris TCP protocol (ontlitcp):

marathon onipcshm marathon marathon

marathon_net ontlitcp marathon marathon_marathon

The fourth column contains the database server name for local connections, and the service name (as defined in the services file) for network connections.

Table 1. Protocols (nettypes) for supported platforms
Platform Local Remote (Sockets)
Solaris onipcshm ontlitcp
AIX onipcshm onsoctcp
Linux onipcshm onsoctcp

For AIX and Linux, heterogeneous UNIX installations can share a single copy of the $CCM_HOME/informix/etc directory. Therefore, a single copy of the $CCM_HOME/informix/etc/sqlhosts file is needed. Entries added to sqlhosts by ccmsrv create are visible to all UNIX platforms.

If you did not link the $CCM_HOME/informix/etc directories, after creating a server on one platform you must copy the entries from the sqlhosts file for that platform to the sqlhosts files for your other platforms.

With Solaris, the network protocol supported by Informix is different from the HP, AIX, or Linux platforms. The sqlhosts file for Solaris must be different. You must add entries manually to the sqlhosts files after creating a server if you want that server to be accessible from other platforms.

For example, after creating a server on an HP computer named moby, you would have two entries in the sqlhosts file on the HP:

mobysrv onipcshm         moby    mobysrv
mobysrv_net onsoctcp     moby    mobysrv_moby

If you want to access this server from a Solaris platform, which cannot share the sqlhosts file, you must add an entry such as the following to the Solaris sqlhosts file:

mobysrv_net     ontlitcp     moby    mobysrv_moby

Similarly, after creating a server on a Solaris computer named stellar, you would have two entries in the Solaris sqlhosts file:

stellarsrv     onipcshm     stellar     stellarsrv
stellarsrv_net ontlitcp     stellar     stellarsrv_stellar

To access the stellarsrv server from HP-UX, AIX, or Linux systems, you must copy the following line to the sqlhosts file on each of those other platforms:

stellarsrv_net onsoctcp     stellar     stellarsrv_stellar

Feedback