The sqlhosts file and the SQLHOSTS registry key
HCL® OneDB® client/server connectivity information, the sqlhosts information, contains information that enables a client application to find and connect to any HCL OneDB database server on the network.
The sqlhosts file (UNIX™)
On UNIX, the sqlhosts file is located, by default, in the $INFORMIXDIR/etc directory.
If you store the information in another location, you must set the INFORMIXSQLHOSTS environment variable.
- In one sqlhosts file, pointed to by the INFORMIXSQLHOSTS environment variable
- In separate sqlhosts files in each database server directory
Each entry in the sqlhosts file contains the sqlhosts information for a database server or a database server group. Additional syntax rules for each of the fields are provided in the following sections, which describe the entries in the sqlhosts file. Use any standard text editor to enter information in the sqlhosts file.
The SQLHOSTS registry key (Windows™)
- For an HCL
OneDB 64-bit
product installed on a Windows 64-bit
system or an HCL
OneDB 32-bit
product installed on a Windows 32-bit
system, the sqlhosts information is in this key:
HKEY_LOCAL_MACHINE\SOFTWARE\INFORMIX\SQLHOSTS
- For an HCL
OneDB 32-bit
product installed on a Windows 64-bit
system, the sqlhosts information is in this key:
HKEY_CLASSES_ROOT\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Informix\SQLHOSTS
This branch of the HKEY_LOCAL_MACHINE subtree stores the SQLHOSTS information. Each key on the SQLHOSTS branch is the name of a database server. When you click the database server name, the registry displays the values of the HOST, OPTIONS, PROTOCOL, and SERVICE fields for that particular database server.
Each computer that hosts a database server or a client must include the connectivity information either in the SQLHOSTS registry key or in a central registry. When the client application runs on the same computer as the database server, they share a single SQLHOSTS registry key.
- The local computer where you are installing the database server
- Another computer in the network that serves as a central, shared repository of SQLHOSTS information for multiple database servers in the network
Using a shared SQLHOSTS registry key relieves you of the necessity to maintain the same sqlhosts information about multiple computers. However, the hosts and services files on each computer must contain information about all computers that have database servers.
- regedt32
- Setnet32
The default location of the sqlhosts file is:
- UNIX:
- $INFORMIXDIR/etc/sqlhosts
- Windows:
- %INFORMIXDIR%\etc\sqlhosts.%INFORMIXSERVER%
If you store the information in another location, you must set the INFORMIXSQLHOSTS environment variable.
- In one sqlhosts file, pointed to by the INFORMIXSQLHOSTS environment variable
- In separate sqlhosts files in each database server directory