You can install Connection Managers on the hosts of application
servers, and then prioritize the connections between specific application
servers and the primary server of a high-availability cluster. This
configuration allows the highest priority application server to maintain
its connection to the cluster's primary server if a portion of the
network fails.
About this task
You can configure failover for the following conditions:
- When the primary server becomes inoperative.
- When an application server loses network connectivity with the
primary server.
If network monitoring and failover priority are enabled and
a network failure occurs, an application server that loses connectivity
to the primary server but maintains connectivity to a secondary server
can, through a shared-host Connection Manager, initiate failover to
the secondary server. If, however, failover would cause an application
server with more priority to lose connectivity to the primary server,
the Connection Managers block failover.
Network monitoring
and failover priority are enabled by setting the following parameters
and attributes in each Connection Manager's configuration file:
- The Connection Manager's LOCAL_IP parameter
- A CLUSTER connection-unit's SLA parameters
- A CLUSTER connection-unit's FOC parameter
- The FOC parameter's ORDER attribute
- The FOC parameter's PRIORITY attribute
Procedure
- Install at least two network interface cards on each host.
This method prevents the failure of a network interface card
from causing client, Connection Manager, or database server connectivity
failure.
- Install and configure Connection Managers on each application
server's host.
- Set the LOCAL_IP parameter in each Connection Manager
configuration file to the IP addresses of the host's NIC cards.
For example:
The first Connection Manager's configuration
file is named
cm_1.cfg and has the following entries:
NAME connection_manager_1
LOCAL_IP 192.0.2.0,192.0.2.1
The second Connection Manager's configuration file
is named
cm_2.cfg and has the following entries:
NAME connection_manager_2
LOCAL_IP 192.0.2.2,192.0.2.3
- Create service-level agreements for each Connection
Manager.
For example:
cm_1.cfg now has the
following entries:
NAME connection_manager_1
LOCAL_IP 192.0.2.0,192.0.2.1
CLUSTER my_cluster
{
ONEDB_SERVER my_servers
SLA sla_1 DBSERVERS=PRI
SLA sla_2 DBSERVERS=SDS,HDR,RSS
}
cm_2.cfg now has the following entries:
NAME connection_manager_1
LOCAL_IP 192.0.2.2,192.0.2.3
CLUSTER my_cluster
{
ONEDB_SERVER my_servers
SLA sla_3 DBSERVERS=PRI
SLA sla_4 DBSERVERS=SDS,HDR,RSS
}
- Specify each application server's priority by setting
the FOC parameter's PRIORITY attribute for each shared-host Connection
Manager.
A PRIORITY value must be a positive integer and
unique among all the Connection Managers that are configured to manage
a specific cluster. If you specify a PRIORITY value in a connection-unit
definition, you must set the ORDER attribute to ENABLED, and specify
the failover order in the primary server's HA_FOC_ORDER configuration
parameter.
For example:
The primary server has the
following
onconfig file entry:
HA_FOC_ORDER SDS,HDR,RSS
cm_1.cfg now
has the following entries:
NAME connection_manager_1
LOCAL_IP 192.0.2.0,192.0.2.1
CLUSTER my_cluster
{
ONEDB_SERVER my_servers
SLA sla_1 DBSERVERS=PRI
SLA sla_2 DBSERVERS=SDS,HDR,RSS
FOC ORDER=ENABLED PRIORITY=1
}
cm_2.cfg now has the following entries:
NAME connection_manager_2
LOCAL_IP 192.0.2.2,192.0.2.3
CLUSTER my_cluster
{
ONEDB_SERVER my_servers
SLA sla_3 DBSERVERS=PRI
SLA sla_4 DBSERVERS=SDS,HDR,RSS
FOC ORDER=ENABLED PRIORITY=2
}
- Create sqlhosts files that contain
network connectivity information for each Connection Manager and database
server host.
- Optional: Create a password file if you configure
secure ports for database servers.
- Run the oncmsm utility on each Connection
Manager host, to start each Connection Manager.
On
the host of
connection_manager_1:
oncmsm -c cm_1.cfg
On
the host of
connection_manager_2:
oncmsm -c cm_2.cfg
- Check each Connection Manager's log file to verify that
the Connection Manager started correctly.
Results
The Connection Managers now initiate failover if a network
failure occurs, and failover would not cause a higher-priority application
server to lose its connectivity to the cluster's primary server.