Procedure documentationSetting Up the Replication Server

 

If you want to make your system a high availability solution, you need the enqueue replication server as well as the standalone enqueue server.

Prerequisites

Note Note

Note that you have to start the (A)SCS to activate the changes.

End of the note.

Procedure

Caution Caution

The following description applies to UNIX platforms only. You can find information about installing the enqueue replication server under Windows in the section, High Availability with Microsoft Cluster Service.

End of the caution.

The description refers to two physical hosts (host1 and host2), which share the virtual host name hahost. The SID (SAP system ID) of the system is called PLLPLL in the graphic.

This graphic is explained in the accompanying text.

High Availability with the Replication Server

Under administration user plladm perform the following steps on the two physical hosts host1 and host2.

Executable Directory refers to the following directory:

  • The directory determined by DIR_CT_RUN for the systems with DIR_CT_RUN in the (A)SCS instance profile. The DIR_CT_RUN for the ERS instance profile to be created should then be the same as for the (A)SCS instance.

  • The directory determined by DIR_EXECUTABLE for the system without DIR_CT_RUN in the (A)SCS instance profile. The DIR_CT_RUN for the ERS instance profile to be created should then be the DIR_EXECUTABLE of the (A)SCS instance.

  1. Create the following directory structure:

    Syntax Syntax

    1. /usr/sap/PLL/ERS<inst.no> 
                       +--- exe
                       |     +--- servicehttp
                       |                +--- sapmc
                       +--- log
                       +--- data
                       +--- work
      
    End of the code.

    with the following names:

    • ERS: prefix for the enqueue replication server

    • PLL: System ID of the SAP system to which the new instance belongs (see above)

    • <inst.no>: Instance number of the new instance (here 11)

    Note Note

    With some hardware cluster solutions the central SAP file system (/sapmnt/<SID>) is not available on all cluster nodes. In this case you have to also put the profile directory into the local ERS instance directory tree: /usr/sap/PLL/ERS<inst.no.>/profile.

    By creating the file in the local file system, you are not independent of the availability of the /sapmnt file system.

    End of the note.
  2. Copy the following files from the executable directory into directory /usr/sap/PLL/ERS<inst.no.>/exe:

    enqt

    enrepserver

    ensmon

    libicudata.so.30

    libicui18n.so.30

    libicuuc.so.30

    libsapu16_mt.so

    librfcum.so

    sapcpe

    sapstart

    sapstartsrv

    sapcontrol

    Copy the following files from the executable directory into directory /usr/sap/PLL/ERS<inst.no.>/exe/servicehttp/sapmc:

    sapmc.jar

    sapmc.html

    frog.jar

    soapclient.jar

    Note Note

    The files can have different extensions on different UNIX platforms. Depending on the platform and whether unicode is used, there may not be as many files.

    End of the note.

    Caution Caution

    Make sure that authorizations (read and execute) for user plladm are set correctly.

    End of the caution.
  3. Create an sapcpe list file with the name ers.lst in directory /usr/sap/<SID>/ERS<inst.no.>/exe. This file has the following content:

    enrepserver

    ensmon

    enqt

    libsapu16_mt.so

    libsapu16.so

    libicuuc.so.30

    libicudata.so.30

    libicui18n.so.30

    librfcum.so

    sapcpe

    sapstartsrv

    sapstart

    sapcontrol

    servicehttp

    ers.lst

  4. Create a new start profile in the profile directory.

    Your (A)SCS instance could also have the following parameters:

    SCS SAPSID = PLL

    SCS INST.NO. = 01

    SCS HOST = hahost (virtual host name)

    The corresponding replication instance might look like this:

    ERS SAPSID = PLL

    ERS INST.NO. = 11

    ERS HOST = host1

    The corresponding start profile START_ERS11_host1 will look like:

    SAPSYSTEM = 11

    SAPSYSTEMNAME = PLL

    INSTANCE_NAME = ERS11

    #--------------------------------------------------------------------

    # Special settings for this manually set up instance

    #--------------------------------------------------------------------

    SCSID = 01

    DIR_EXECUTABLE = $(DIR_INSTANCE)/exe

    DIR_CT_RUN = /usr/sap/PLL/SYS/exe/run

    SETENV_00 = PATH=$(DIR_INSTANCE)/exe:%(PATH)

    SETENV_01 = LD_LIBRARY_PATH=$(DIR_EXECUTABLE)

    _PF = $(DIR_PROFILE)/PLL_ERS11_host1

    #-----------------------------------------------------------------------

    # Copy SAP Executables

    #-----------------------------------------------------------------------

    _CPARG0 = list:$(DIR_EXECUTABLE)/ers.lst

    Execute_00 = immediate $(DIR_EXECUTABLE)/sapcpe$(FT_EXE) $(_CPARG0) pf=$(_PF)

    #--------------------------------------------------------------------

    # start enqueue replication server

    #--------------------------------------------------------------------

    _ER = er.sap$(SAPSYSTEMNAME)_$(INSTANCE_NAME)

    Execute_01 = immediate rm -f $(_ER)

    Execute_02 = local ln -s -f $(DIR_EXECUTABLE)/enrepserver $(_ER)

    Restart_Program_00 = local $(_ER) pf=$(_PF) NR=$(SCSID)

    Note Note

    If you are using a local profile directory (see above) insert the following profile parameter into the start profile of the ERS instance:

    DIR_PROFILE = $(DIR_INSTANCE)/profile

    End of the note.
  5. Create an instance profile in the profile directory.

    Parameters for the (A)SCS instance (example):

    SCS SAPSID = PLL

    SCS INST.NO. = 01

    SCS HOST = hahost (virtual host name)

    Parameters for the replication instance (example):

    ERS SAPSID = PLL

    ERS INST.NO. = 11

    ERS HOST = host1

    Associated instance profile PLL_ERS11_host1:

    SAPSYSTEM = 11

    SAPSYSTEMNAME = PLL

    INSTANCE_NAME = ERS11

    #--------------------------------------------------------------------

    # Special settings for this manually set up instance

    #--------------------------------------------------------------------

    DIR_EXECUTABLE = $(DIR_INSTANCE)/exe

    DIR_CT_RUN = /usr/sap/PLL/SYS/exe/runU

    #--------------------------------------------------------------------

    # Settings for enqueue monitoring tools (enqt, ensmon)

    #--------------------------------------------------------------------

    enque/process_location = REMOTESA

    rdisp/enqname = $(rdisp/myname)

    #--------------------------------------------------------------------

    # standalone enqueue details from (A)SCS instance

    #--------------------------------------------------------------------

    SCSID = 01

    SCSHOST = hahost

    enque/serverinst = $(SCSID)

    enque/serverhost = $(SCSHOST)

    Note Note

    If you are using a local profile directory (see above) insert the following profile parameter into the instance profile of the ERS instance:

    DIR_PROFILE = $(DIR_INSTANCE)/profile

    End of the note.
  6. Configure the control mechanism for the replication server. Here you have the following options:

    • Self-control with HA PollingPolling

      Here the replication server uses the HA software to periodically request information about the physical host on which the (A)SCS instance is running. Depending on this information the ERS instance is activated or deactivated. To do this you need a tool (a script or a library from your HA hardware partner.)

      Example Example

      If you use an enqtest.sh script in directory DIR_EXECUTABLE you must insert the following lines in the instance profile.

      #--------------------------------------------------------------------

      # HA polling

      #--------------------------------------------------------------------

      enque/enrep/hafunc_implementation = script

      enque/enrep/poll_interval = 10000

      enque/enrep/hafunc_init =

      enque/enrep/hafunc_check = $(DIR_EXECUTABLE)/enqtest.sh

      End of the example.
    • HA Software Control

      With this solution the HA software will stop the ERS instance, if necessary. Ask your HA partner if this procedure is supported.

  7. (Optional). Configure the persistency of the replication table in the file system. This has the advantage that the replication table can be distributed across several hosts by means of the cluster software (shared file system), and that following a failover the enqueue server does not necessarily have to be restarted on the same host on which the active replication was running beforehand.

    To also save the replication table in a shadow file in the file system, insert the following lines in the instance profile:

    #--------------------------------------------------------------------

    # replica table file persistency

    #--------------------------------------------------------------------

    enque/repl/shadow_file_name = /usr/sap/PLL/ERS11/data/SHM_FILESYS_BACKUP

    Caution Caution

    Note that storing the replication table in the file system can lead to a severe drop in enqueue server performance. Beforehand, you should always check whether performance will be sufficient with this option.

    End of the caution.
  8. 8. (Optional). To start the ERS instance automatically when the system is rebooted, insert the following line in file /usr/sap/sapservices:

    LD_LIBRARY_PATH=/usr/sap/PLL/ERS11/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/PLL/ERS11/exe/sapstartsrv pf=/usr/sap/PLL/ERS11/profile/START_ERS11_ls3247 -D -u plladm

    Caution Caution

    This only works if:

    • NetWeaver AS version 7.00has already been installed on this host

    • (Under UNIX) you have already performed the steps described in SAP Note 823941 (Configuring SAP Start Services as UNIX Deamons).

    End of the caution.
  9. Repeat these steps for all the physical hosts in the HA failover cluster. If you want to make another (A)SCS instance more fail-safe, you have to set up a separate set of ERS instances.

Was this page helpful to you?