What is Enqueue Server / Enqueue Replication Server?

An enqueue server is a SAP component with manages Lock table. Enqueue server is also called as lock server.

In any SAP instance in a high availability (HA) configuration, you will be installing the central services instance separately. For ABAP engine it is ASCS & for Java engine it SCS.


Why is a Enqueue Replication Server needed?

In event of disaster when there is a fail-over of the cluster node, the ASCS & SCS services will fall onto the other cluster node. In the event of this procedure the enqueue table will be flushed and lock data is erased. In order to preserve this locks we need to have a duplicate table on the other cluster node. Enqueue replication server serve this purpose on full scale.


A simple view of a 2-node cluster architecture for ERS

High availability enqueue server consists of one standalone enqueue server and an enqueue replication server. The replication enqueue server runs on different host and preserves a replica of the lock table (replication table).


Above diagram is a simple architecture of ERS. Here all clients and replication server are connected to the enqueue server. If you assume above case is AS-ABAP each work process has a separate connection to the standalone enqueue server, but if you assume it as AS Java each server process in the JEE cluster has a separate connection to the en-queue server.

The port sapdpXX (XX is the instance number of the SCS/ASCS instance) is used by en-queue server to communicate with its clients. Since AS ABAP instance also communicates with its clients through this port, the enqueue server must be running in a separate instance, whose instance number is not assigned on the host.

After Installing an “enqueue replication” SAP system, we typically have the following types of instances in cluster:

  • ASCS00 (SCS20) – central service instance with message server and enqueue server,
  • ERS10 – enqueue replication server,
  • PAS01 – primary application server (ABAP / DualStack only),
  • D02, D03, … – Dialog instance (ABAP or Dual-Stack only),
  • J21, J22 …- Java application server (Java only).


Connection between Enqueue Server and Replication Server

The Standalone enqueue server opens the port sapgwXX (or enque/encni/repl_port) establish the connection from the replication server. If the connection is already made from the replication server, the enqueue server rejects any further connections. For example if there is a message “Connect received, but already connected” is written to dev_enqrepl. The message “Connect from host “xxx” indicates which host the problem is coming from.


Enqueue Server Failure

When standalone enqueue server fails, it is started by the HA software on the host on which the replication server is running. The replication table stored on the replication server is copied to the standalone enqueue server and the new lock table is transferred from it. High availability software also ensures that during standalone enqueue server is down, clients’ connection pass through host B instead of host A.

Replication Server Failure

When replication server goes down, it can be restarted on a different host. It copies the replication table from the standalone enqueue server when it restarts. When the replication server is running, it is supplied only with delta information of the each request to the enqueue server.