Show TOC

Background documentationPolling Concept Locate this document in the navigation structure

 

Purpose

The majority of software solutions for high availability cannot be configured in such a way that following a failover both the replication server and the enqueue server switch hosts. The SAP software solves this problem by starting replication servers on several hosts and periodically polling the HA software, to determine which failover host is currently in use.

More information:

Concept

The enqueue server is controlled by the HA software. In the HA software you can specify a group of hosts on which the enqueue server can be started following a failover. These are the possible failover hosts. The system has to be configured in such a way as to ensure that the replication server is started on every host in this group.

Behavior in Productive Operation

A replication server runs on each possible failover host. Each replication server then regularly polls the HA software and checks whether it is running on the failover host currently in use. This is the host on which the enqueue server is to be restarted following a failover. The replication server running on this host is activated (status active) and starts the replication. The other replication servers do nothing (status inactive). All replication servers regularly interrogate the HA software to ascertain whether the failover host has changed (it can change at any time). If the failover host has changed, the active replication server is deactivated (it closes the connection to the enqueue server and deletes the replication table). The replication server on the current failover host, which has been inactive until now, becomes active (it connects to the enqueue server and creates a replication table).

Behavior with Failovers

If there is a failover, all the replication servers switch to the hold status. This does not change anything for the inactive servers. The active server closes the connection to the enqueue server but keeps the replication table. The HA software must stay in the hold status until the newly started enqueue server has read the replication table and created a new lock table.

Caution Caution

If the HA software resets the hold status too early, the replication server may delete the replication table before the enqueue server has connected to it. If this happens the enqueue data will be lost following the failover.

End of the caution.

For this reason the HA software must regularly query the status of the enqueue server. The enqueue server will not accept a connection before it has completed the initialization and read the replication table. You can use the monitor program ensmon here.

Implementation

Polling can be implemented using functions of a DLL provided by your HA software partner. Parameter enque/enrep/ha_dll must be set accordingly.

SAP supplies a separate DLL (ensrepntha.dll) for the Microsoft cluster server under Windows.

On UNIX platforms you can set the profile parameter enque/enrep/hafunc_implementation = script.

Then polling is implemented using a shell script, and its return code evaluated as follows:

0: Replication server is running on the active failover host (Active status)

1 - 4: Failover is taking place (hold status)

Otherwise: Replication server is not running on the active failover host (Inactive status)