To connect to Informix with an IBM Data Server client, you must follow certain configuration steps.
IBM Data Server Client
and an applicable driver must be installed.
- On each Connection Manager and database server host, add sqlhosts file
entries for each server:
For example:
#dbservername nettype hostname servicename options
server_1 onsoctcp host_1 port_1
server_2 onsoctcp host_2 port_2
server_3 onsoctcp host_3 port_3
- In each database server's onconfig file,
set the DBSERVERALIASES parameter to specify an alias for the server.
The
onconfig file entry for
server_1:
DBSERVERALIASES drda_1
The
onconfig file
entry for
server_2:
DBSERVERALIASES drda_2
The
onconfig file
entry for
server_3:
DBSERVERALIASES drda_3
- On each Connection Manager's host, add sqlhosts file
entries for DRDA aliases. Specify
a drtlitcp or drsoctcp protocol and specify a port for DRDA communication.
For
example:
#dbservername nettype hostname servicename options
server_1 onsoctcp host_1 port_1
server_2 onsoctcp host_2 port_2
server_3 onsoctcp host_3 port_3
drda_1 drsoctcp host_1 drda_port_1
drda_2 drsoctcp host_2 drda_port_2
drda_3 drsoctcp host_3 drda_port_3
- On the host of each Connection Manager, add a group entry
for the group of database server and add a group entry for the group
of DRDA aliases. Add group
options to the database server and DRDA alias
entries. Use the
c=1
group-entry option so that connection-attempt
starting points in the list of group members is random. Use the e=last_member
group-entry
option so that the entire sqlhosts is not scanned
for group members. For example:
#dbservername nettype hostname servicename options
my_servers group - - c=1,e=server_3
server_1 onsoctcp host_1 port_1 g=my_servers
server_2 onsoctcp host_2 port_2 g=my_servers
server_3 onsoctcp host_3 port_3 g=my_servers
drda_aliases group - - c=1,e=drda_3
drda_1 drsoctcp host_1 port_4 g=drda_aliases
drda_2 drsoctcp host_2 port_5 g=drda_aliases
drda_3 drsoctcp host_3 port_6 g=drda_aliases
- Add the DRDA service-level
agreements to your Connection Managers' configuration files.
For example:
The first Connection Manager's configuration file has the following entries:
NAME connection_manager_1
CLUSTER my_cluster
{
INFORMIXSERVER my_servers
SLA sla_primary_1 DBSERVERS=PRI
SLA sla_primary_drda_1 DBSERVERS=PRI
SLA sla_secondaries_1 DBSERVERS=SDS,HDR
SLA sla_secondaries_drda_1 DBSERVERS=SDS,HDR
FOC ORDER=ENABLED \
PRIORITY=1
}
The second Connection Manager's configuration file has the following entries:
NAME connection_manager_2
CLUSTER my_cluster
{
INFORMIXSERVER my_servers
SLA sla_primary_2 DBSERVERS=PRI
SLA sla_primary_drda_2 DBSERVERS=PRI
SLA sla_secondaries_2 DBSERVERS=SDS,HDR
SLA sla_secondaries_drda_2 DBSERVERS=SDS,HDR
FOC ORDER=ENABLED \
PRIORITY=2
}
- On the host of each IBM Data Server client,
create sqlhosts file entries for each service-level
agreement (SLA) in each Connection Manager configuration file. Create
group entries for each group of SLA entries, and add group options
to the SLA entries.
For example:
#dbservername nettype hostname servicename options
g_primary group - - c=1,e=sla_primary_2
sla_primary_1 onsoctcp cm_host_1 cm_port_1 g=g_primary
sla_primary_2 onsoctcp cm_host_2 cm_port_2 g=g_primary
g_secondaries group - - c=1,e=sla_secondaries_2
sla_secondaries_2 onsoctcp cm_host_1 cm_port_3 g=g_secondaries
sla_secondaries_2 onsoctcp cm_host_2 cm_port_4 g=g_secondaries
g_primary_drda group - - c=1,e=sla_primary_2_drda
sla_primary_1_drda drsoctcp cm_host_1 cm_port_5 g=g_primary_drda
sla_primary_2_drda drsoctcp cm_host_2 cm_port_6 g=g_primary_drda
g_secondaries_drda group - - c=1,e=sla_secondaries_2_drda
sla_secondaries_2_drda drsoctcp cm_host_1 cm_port_7 g=g_secondaries_drda
sla_secondaries_2_drda drsoctcp cm_host_2 cm_port_8 g=g_secondaries_drda
In the previous example, IBM Data Server client
connection requests to @g_primary_drda are sent by drsoctcp protocol
to one of the Connection Managers. The Connection Manager that receives
the request uses an SLA to provide the client application with connection
information for the primary server.
If you receive error -23104
when accessing the server through the DRDA protocol,
the client application might be trying to bind a value that has an
encoding different from the code page or code set of the database
locale. Set the GL_USEGLU environment variable
to 1
before you start the Informix instance.
This setting enables the server to initialize the appropriate Unicode
converters that are required to handle the code set conversions.