Chapter 4. Configuring the ASCS and ERS instances


4.1. Configuring the ASCS/ERS instance profiles

The ASCS and ERS instance profiles contain Restart directives for certain instance services by default. You must modify the profiles to prevent the automatic restart of the enqueue replication server process by the SAP Start service, because the cluster manages the availability of this service.

Procedure

  1. Update the profile of the ASCS instance and rename the Restart_Program_01 parameter of the enqueue server:

    [root]# sed -i -e 's/Restart_Program_01/Start_Program_01/' \
    /sapmnt/<SID>/profile/<SID>_ASCS<instance>_<ascs_virtual_hostname>
    • Replace <SID> with your instance SID, for example, S4H.
    • Replace <instance> with the ASCS instance number, for example, 20.
    • Replace <ascs_virtual_hostname> with the virtual hostname of your ASCS instance, for example, s4hascs.
  2. Update the profile of the ERS instance and rename the Restart_Program_00 parameter of the enqueue server:

    [root]# sed -i -e 's/Restart_Program_00/Start_Program_00/' \
    /sapmnt/<SID>/profile/<SID>_ERS<instance>_<ers_virtual_hostname>
    • Replace <SID> with your instance SID, for example, S4H.
    • Replace <instance> with the ERS instance number, for example, 29.
    • Replace <ers_virtual_hostname> with the virtual hostname of your ERS instance, for example, s4hers.

Verification

  1. Verify that the ASCS instance profile does not contain the Restart_Program_01 parameter:

    [root]# grep Restart_Program_01 /sapmnt/S4H/profile/*_ASCS*
  2. Verify that the ERS instance profile does not contain the Restart_Program_00 parameter:

    [root]# grep Restart_Program_00 /sapmnt/S4H/profile/*_ERS*

Systemd integration is the default configuration as of SAP Kernel Release 788. In HA environments you must apply additional modifications to integrate the different systemd services that are involved in the cluster setup.

You must execute the configuration on every cluster node and for every instance that you plan to manage in the cluster. At a minimum you must configure this for the ASCS and ERS instances. PAS and AAS instance configuration is optional and only required if you manage them in the same cluster.

Procedure

  1. Register the ASCS instance. Run the following SAP command as the root user to create the systemd integration:

    [root]# export LD_LIBRARY_PATH=/usr/sap/<SID>/ASCS<instance>/exe && \
    /usr/sap/<SID>/ASCS<instance>/exe/sapstartsrv \
    pf=/usr/sap/<SID>/SYS/profile/<SID>_ASCS<instance>_<ascs_virtual_hostname> \
    -reg

    The command executes the sapstartsrv service for the selected instance profile and registers the instance service on the current system. It creates the systemd unit for the instance service, if it does not exist, and updates the local /usr/sap/sapservices file.

    • Replace <SID> with your ASCS instance SID, for example, S4H.
    • Replace <instance> with your ASCS instance number, for example, 20.
    • Replace <ascs_virtual_hostname> with the virtual hostname for your ASCS instance, for example, s4hascs.
  2. Register the ERS instance by repeating step 1 for the ERS profile:

    [root]# export LD_LIBRARY_PATH=/usr/sap/<SID>/ERS<instance>/exe && \
    /usr/sap/<SID>/ERS<instance>/exe/sapstartsrv \
    pf=/usr/sap/<SID>/SYS/profile/<SID>_ERS<instance>_<ers_virtual_hostname> \
    -reg
    • Replace <SID> with your ERS instance SID, for example, S4H.
    • Replace <instance> with your ERS instance number, for example, 29.
    • Replace <ers_virtual_hostname> with the virtual hostname for your ERS instance, for example, s4hers.
  3. Optional: Register any PAS or AAS instance by repeating step 1 for the respective application server profile. Skip this step if you do not configure PAS or AAS instances in this cluster:

    [root]# export LD_LIBRARY_PATH=/usr/sap/<SID>/D<instance>/exe && \
    /usr/sap/<SID>/D<instance>/exe/sapstartsrv \
    pf=/usr/sap/<SID>/SYS/profile/<SID>_D<instance>_<as_virtual_hostname> \
    -reg
    • Replace <SID> with your PAS or AAS instance SID, for example, S4H.
    • Replace <instance> with your PAS or AAS instance number, for example, 21.
    • Replace <as_virtual_hostname> with the virtual hostname for your PAS or AAS instance, for example, s4hpas.
  4. Disable the ASCS, ERS and any other application instance service that the cluster manages after the setup:

    [root]# systemctl disable SAP<SID>_<instance>.service
    Removed "/etc/systemd/system/multi-user.target.wants/SAP<SID>_<instance>.service".

    Run this using the ASCS instance number and repeat the command using the ERS instance number.

    Optional: Repeat the same for the PAS or AAS instance services.

  5. Create the systemd drop-in directory for the ASCS, ERS and any other application instance service that the cluster manages after the setup:

    [root]# mkdir /etc/systemd/system/SAP<SID>_<instance>.service.d

    Run this using the ASCS instance number and repeat the command using the ERS instance number.

    Optional: Repeat using the PAS or AAS instance number.

  6. Create the drop-in files for the instances in the new directory:

    [root]# cat << EOF > /etc/systemd/system/SAP<SID>_<instance>.service.d/HA.conf
    [Service]
    Restart=no
    EOF

    Run this using the ASCS instance number and repeat the command using the ERS instance number.

    Optional: Repeat using the PAS or AAS instance number.

  7. Reload the systemd units to activate the drop-in configuration:

    [root]# systemctl daemon-reload
  8. Repeat all steps on each cluster node for every instance.

Verification

  1. Check that all instances have instance systemd units and that they are disabled:

    [root]# systemctl list-unit-files SAPS4H*
    UNIT FILE         STATE    PRESET
    SAPS4H_20.service disabled disabled
    SAPS4H_29.service disabled disabled

    Optional: PAS or AAS instance service files are listed as well in all of the verification steps when you have configured the application server instances.

  2. Check that the sapservices file contains entries for every instance:

    [root]# cat /usr/sap/sapservices
    systemctl --no-ask-password start SAPS4H_20 # sapstartsrv pf=/sapmnt/S4H/profile/S4H_ASCS20_s4hascs
    systemctl --no-ask-password start SAPS4H_29 # sapstartsrv pf=/sapmnt/S4H/profile/S4H_ERS29_s4hers
  3. Check that all systemd configuration overrides are present:

    [root]# systemd-delta | grep SAP
    ...
    [EXTENDED]   /etc/systemd/system/SAPS4H_20.service  /etc/systemd/system/SAPS4H_20.service.d/HA.conf
    [EXTENDED]   /etc/systemd/system/SAPS4H_29.service  /etc/systemd/system/SAPS4H_29.service.d/HA.conf
  4. Repeat the steps on every cluster node. The results must be the same on all nodes.

Start and stop the application instances on all cluster nodes to verify that the prerequisites are met to configure and manage the instances in the cluster.

Prerequisites

  • You have configured the systemd-based SAP Start framework. If not, you must use the respective sapcontrol commands instead of the systemctl commands for the stop and start of the instances.
  • You have stopped each instance before starting it on another node.

Procedure

  1. Stop the instance on the node where it currently runs, for example, stop ASCS on node1:

    [root]# systemctl stop SAP<SID>_<instance>.service

    Stopping the SAP instance systemd service stops both the instance service and the instance itself.

  2. Start the instance service sapstartsrv on the node where it was not running before, for example, start the ASCS service on node2:

    [root]# systemctl start SAP<SID>_<instance>.service
  3. Start the instance using sapcontrol as the <sid>adm user. Replace <instance> with the instance number, for example, 20 for the ASCS instance:

    <sid>adm $ sapcontrol -nr <instance> -function Start
  4. Verify the instance’s health after it starts on the other node. Run this check as the <sid>adm user. Replace <instance> with the instance number, for example, 20 for the ASCS instance. The status of all services must be GREEN:

    <sid>adm $ sapcontrol -nr <instance> -function GetProcessList
  5. Optional: Repeat the previous steps to move the instance back to its original node, for example, move ASCS back to node1.
  6. Repeat all steps for the ERS instance.
  7. Optional: If you configure PAS or AAS instances, then repeat the steps for these application server instances as well.

4.4. Installing the SAP license keys

To ensure that the SAP instances continue to run after a failover, you have to install several SAP license keys based on the hardware key of each cluster node. See SAP Note 1178686 - Linux: Alternative method to generate a SAP hardware key for more information.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top