Sun Cluster Data Service for SAP Web Application Server Guide for Solaris OS

Installing and Configuring Sun Cluster HA for SAP Web Application Server

This chapter explains how to install and configure Sun Cluster HA for SAP Web Application Server.

This chapter contains the following sections.

Sun Cluster HA for SAP Web Application Server Overview

The SAP Web Application Server platform consists of the following components:

If the configuration includes both the ABAP engine and the SAP J2EE engine, two SAP central services components exist.


Caution – Caution –

For a detailed description of the SAP Web Application Server platform, see the version of the SAP document SAP Web Application Server in Switchover Environments, UNIX Platforms that corresponds to your version of the platform. In particular, study the section that provides an overview of the architecture of the SAP Web Application Server to be certain that you understand the basic concepts of your version of the SAP Web Application Server.

For example, with SAP Netweaver 04, the architecture of the SAP Web Application Server components (such as SAP enqueue server and SAP message server) changed significantly. Therefore, when running in the Sun Cluster environment, these components must be configured differently from previous versions of the platform.


To eliminate potential single points of failure in an SAP Web Application Server platform, Sun Cluster HA for SAP Web Application Server provides fault monitoring, automatic restart, and automatic failover for the components of the SAP Web Application Server platform.

The SAP web application server component of the platform can be configured either as a failover or as a scalable data service. The SAP J2EE engine component can also be configured either as failover or as scalable. The other components must be configured as failover data services.

For conceptual information about failover services and scalable services, see the Sun Cluster Concepts Guide for Solaris OS.

Each component of the SAP Web Application Server platform has a data service that protects the component in a Sun Cluster configuration, as described in the following table.

Table 1 Protection of SAP Web Application Server Components by Sun Cluster Data Services

SAP Web Application ServerComponent 

Data Service 

SAP enqueue server 

Resource type for SAP enqueue server in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.sapenq.

SAP replica server 

Resource type for SAP replica server in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.saprepl.

SAP message server 

Resource type for SAP message server in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.sapscs.

SAP web application server 

Resource type for SAP web application server component in Sun Cluster HA for SAP Web Application Server. 

The resource type is SUNW.sapwebas.

Stand-alone SAP J2EE engine 

The resource for the SAP Web Application Server stack that is designated for JavaTM software only.

The resource type is SUNW.gds.

Database 

The data service for the database that you are using, for example: 

NFS file system 

Sun Cluster HA for NFS. 

For more information about this data service, see Sun Cluster Data Service for NFS Guide for Solaris OS.

Overview of the Installation and Configuration Process for Sun Cluster HA for SAP Web Application Server

The following table summarizes the tasks for installing and configuring Sun Cluster HA for SAP Web Application Server and provides cross-references to detailed instructions for performing these tasks. Perform the tasks in the order that they are listed in the table.

Table 2 Tasks for Installing and Configuring Sun Cluster HA for SAP Web Application Server

Task 

For Instructions, Go To … 

Plan the SAP Web Application Server installation 

Your SAP documentation 

Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Planning the Sun Cluster HA for SAP Web Application Server Installation and Configuration

Install SAP Web Application Server and configure the application to run in a cluster 

Installing and Configuring SAP Web Application Server

Verify the SAP Web Application Server installation and configuration 

Verifying the SAP Web Application Server Installation and Configuration

Install the Sun Cluster HA for SAP Web Application Server packages 

Installing the Sun Cluster HA for SAP Web Application Server Packages

Register and configure the Sun Cluster HA for SAP Web Application Server data service 

Registering and Configuring Sun Cluster HA for SAP Web Application Server

(Optional) Use alternate project identifier (ID) 

Using Alternate Project Identification

(Optional) Tune the Sun Cluster HA for SAP Web Application Server fault monitors 

Tuning the Sun Cluster HA for SAP Web Application Server Fault Monitors

Verify the Sun Cluster HA for SAP Web Application Server installation and configuration 

Verifying the Sun Cluster HA for SAP Web Application Server Installation and Configuration

(Optional) Activate debugging for the SAP J2EE engine 

Debugging Sun Cluster HA for SAP J2EE Engine

Planning the Sun Cluster HA for SAP Web Application Server Installation and Configuration

This section contains the information that you need to plan your Sun Cluster HA for SAP Web Application Server installation and configuration.


Note –

Before you begin, consult your SAP documentation for configuration restrictions and requirements that are not stated in Sun Cluster documentation or imposed by Sun Cluster software.

Be sure to read all SAP notes that pertain to your release of SAP Web Application Server.


Configuration Restrictions


Caution – Caution –

Configuration restrictions are planned and are related to design decisions. Your data service configuration might not be supported if you do not observe these restrictions.


For restrictions that apply to all data services, see the release notes for your release of Sun Cluster at http://docs.sun.com. The following configuration restriction applies only to Sun Cluster HA for SAP Web Application Server.

The following configuration restrictions apply only to Sun Cluster HA for SAP Web Application Server.

Configuration Requirements


Caution – Caution –

Configuration requirements represent actions that you must perform. If your data service configuration does not satisfy these requirements, the data service configuration might not be supported.


For requirements that apply to all data services, see Configuration Guidelines for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

The following configuration requirements apply only to Sun Cluster HA for SAP Web Application Server.

Supported Data Service Configurations

Sun Cluster HA for SAP Web Application Server supports configurations that conform to the requirements that are specified in the previous section.

All configurations of Sun Cluster HA for SAP Web Application Server have the following requirements:

The following examples show the following supported configurations of Sun Cluster HA for SAP Web Application Server.


Example 1 SAP Web Application Server Component Configured as a Failover Resource

This example shows a standard configuration of Sun Cluster HA for SAP Web Application Server with the SAP web application server component that is configured as a failover resource.

The boxes that have a solid border represent the location of the resource groups before failover.

The boxes that have a dashed border represent the location of the resource groups after a failover because of a problem on the first node. The SAP central services resource group fails over, and the SAP replica server resource group consequently moves to another node. The SAP web application server component resource group also fails over.

Illustration: The preceding context describes the graphic.

Example 2 SAP Web Application Server Component Configured as a Scalable Resource

This example shows a standard configuration of Sun Cluster HA for SAP Web Application Server with the SAP web application server component that is configured as a scalable resource.

The boxes that have a solid border represent the location of the resource groups before failover.

The boxes that have a dashed border represent the location of the resource groups after a failover because of a problem on the first node. As in the previous example, the SAP central services resource group fails over, and the SAP replica server resource group consequently moves to another node. Because the SAP web application server component resource group is scalable, it does not fail over, but the corresponding resource groups on the other node continue running.

Illustration: The preceding context describes the graphic.

Configuration Considerations

The following configuration considerations affect the installation and configuration of Sun Cluster HA for SAP Web Application Server.

Configuration Planning Questions

Use the questions in this section to plan the installation and configuration of Sun Cluster HA for SAP Web Application Server. Write the answers to these questions in the space that is provided on the data service worksheets in Configuration Worksheets in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Installing and Configuring SAP Web Application Server

To enable Sun Cluster HA for SAP Web Application Server to make SAP Web Application Server highly available, additional installation and configuration operations are required. These operations supplement the standard installation and standard configuration of the SAP Web Application Server.

The procedures in this section describe the installation and configuration of the following components of the SAP Web Application Server.

Configuring Your Highly Available Database

SAP supports various databases. You must configure the resource type, the resource group, and the resources for the database that you plan to use so that the database will be highly available. See details in the appropriate Sun Cluster Data Services document for the database that you plan to use.

ProcedureHow to Install and Configure the SAP Web Application Server and the SAP J2EE Engine

Steps
  1. On one node of the cluster, install the SAP Web Application Server software.

    Refer to the SAP installation documentation.

  2. On the same node, if you are using the SAP J2EE engine, install the SAP J2EE engine software.

    Refer to the SAP installation documentation.

  3. Create profiles for the SAP enqueue server and the SAP replica server.

    Refer to the SAP document SAP Web Application Server in Switchover Environments, UNIX Platforms.


    Note –

    The SAPSYSTEM parameter in the SAP enqueue server profile and in the SAP replica server profile must have the same value.


  4. Remove the startup of the SAP enqueue server from the SAP start profile.

    In the Sun Cluster environment, the SAP enqueue server resource starts the SAP enqueue server application. Therefore, if the SAP start profile contains the startup of the SAP enqueue server, remove it. Otherwise, the SAP enqueue server will be started more than once.

  5. If the Process Monitor Facility (PMF) will be used with the SAP web application server component, the saposcol program must be started outside of the cluster environment on all the nodes that will run the SAP Web Application Server.

    The SUNW.sapwebas resource type represents the SAP web application server component in a Sun Cluster configuration. The extension property Webas_Use_Pmf for this resource type determines if PMF will be used with the SAP web application server component.

    If PMF is used, you must start the saposcol program outside of the cluster environment so that PMF does not stop the saposcol program when it stops the resource for the SAP web application server component.

    The saposcol program must be available to all the nodes that are running the SAP Web Application Server. Therefore, the program must be either in a global file system or in the local file system of each node.

    1. If the saposcol program is on the global file system and you want it to be on the local file systems, copy the program to the local file systems by performing the following actions on each node:

      • On the installation node, if the saposcol program was started separately, stop the saposcol program.

      • If the SAP system is running, stop the SAP system.

      • If the file system is not mounted, mount it to the installation node.

      • Copy the saposcol executable file from the installation node to a local directory on the target node.


        # cp /usr/sap/SAPSID/SYS/exe/saposcol destination-directory
        

        Note that SAPSID is the SAP system identification.

    2. Remove the startup of the saposcol program from the SAP start script of the SAP web application server component that will be configured to use PMF. This action is also mentioned in Step 9, together with other modifications to the SAP start and stop scripts.

    3. Start the saposcol program.

      • If the program is on the global file system, start the program from the global location.

      • If the program is on the local file system, start the program from the local directory on each node.

  6. Create a script to return logical host names for the SAP message server and the SAP web application server components.

    Create a script named loghost, which returns the logical host names for each instance of both the SAP message server and the SAP web application server components. The script must be located in the directory $HOME, where $HOME specifies the home directory of the SAP user. The following commands provide an example of the loghost script.


    if [ "$1" = "DVEBMGS00" ]; then
        echo loghost-1;
    fi
    if [ "$1" = "SCS01" ]; then
        echo loghost-2;
    fi
    if [ "$1" = "D02" ]; then
        echo loghost-3;
    fi

    Note –

    If the SAP web application server component is configured as a scalable resource, you will modify this script in a later section, How to Modify the Installation for a Scalable SAP Web Application Server Component.


  7. If you are using the SAP J2EE engine, modify the loghost script to return logical host names for the SAP J2EE engine.

    Modify the script loghost, which was created in Step 6, to return the logical host names for each instance of the SAP J2EE engine. The script is located in the directory $HOME, where $HOME specifies the home directory of the SAP user. The following commands provide an example of the modification of the loghost script.


    if [ "$1" = "JC00" ]; then
        echo loghost-4;
    fi
    if [ "$1" = "SCS02" ]; then
        echo loghost-5;
    fi
    if [ "$1" = "J02" ]; then
        echo loghost-6;
    fi
  8. Set the file permissions for the script so that it is executable.


    # chmod 755 $HOME/loghost
    
  9. Modify the SAP start and stop scripts as follows:

    1. Ensure the uniqueness of the instance names.

      Add a sort -u command to the end of the line that begins with INSTANCE= in the SAP start and stop scripts. This command sorts all the instance names that are found and retains only the unique names.

      The original line is the following, where arg is the argument number, for example, 1 or 2.


      INSTANCE=`echo $arg | awk '/SCS[0-9][0-9]/{print $1}
      /ASCS[0-9][0-9]/{print $1} /DVEBMGS[0-9][0-9]/{print $1} 
      /JC[0-9][0-9]/{print $1} /D[0-9][0-9]/{print $1} 
      /J[0-9][0-9]/{print $1} /G[0-9][0-9]/{print $1}'`

      After you add a pipe to a sort -u command at the end, the line is the following, where arg is the argument number, for example, 1 or 2.


      INSTANCE=`echo $arg | awk '/SCS[0-9][0-9]/{print $1}
      /ASCS[0-9][0-9]/{print $1} /DVEBMGS[0-9][0-9]/{print $1} 
      /JC[0-9][0-9]/{print $1} /D[0-9][0-9]/{print $1} 
      /J[0-9][0-9]/{print $1} /G[0-9][0-9]/{print $1}' | sort -u`
    2. Update the SAP start and stop scripts to call the script that returns logical host names.

      In the section for setting HOSTNAME, insert the name of the script $HOME/loghost, which you created in Step 6. This action is accomplished by replacing the line HOSTNAME='hostname' with the lines in the following example.


      < remove
      > add
      
      # Set HOSTNAME
      case `uname` in
         OS/390* | z/OS* | AIX* | BOS*)
           HOSTNAME=`hostname -s`
           ;;
         *)
      <    HOSTNAME=`hostname`
      >    if [ $# -eq 2 ]; then
      >         HOSTNAME=`$HOME/loghost $2`
      >    else
      >         HOSTNAME=`hostname`
      >    fi
           ;;
      esac
    3. In order to source the user's profile and thus also source the SAP-specific environment files, add the following line as the second line of the SAP start and stop scripts.

      . $HOME/.profile

    4. Remove the DB check for the SAP central services components from the SAP start script. The SAP central services components are the SAP enqueue server, the SAP replica server, and the SAP message server.

    5. If PMF is used with the SAP web application server, remove the startup of the saposcol program from the SAP start script that is used by this SAP web application server. See also Step 5.

  10. Modify the file names and contents to use logical host names instead of physical host names.

    The standard SAP Web Application Server installation uses the physical host name of the node on which the SAP system is installed. You must modify SAP Web Application Server to use a logical host name so that SAP Web Application Server works in a Sun Cluster environment.


    Note –

    If the SAP web application server component is configured as a scalable resource, you will make additional modifications in a later section, How to Modify the Installation for a Scalable SAP Web Application Server Component.


    1. Make sure that the names of the “.” files in the home directory of the SAP user do not contain the physical host name.

      In the following example, the physical host name is removed from the names of the “.” files.


      for i in .*physical-hostname.*
        > do
        > mv $i `echo $i | sed "s/_physical-hostname//"`
        > done
    2. Make sure that the names and contents of the database “.” files refer to logical host name that is used by the database and not to physical host names.

    3. Change the file names and contents of the profile files to use the logical host name corresponding to the individual component instead of physical host names.

      These files are located in /usr/sap/SAPSID/SYS/profile, where SAPSID is the SAP system identification.

    4. Add the following logical-host-name entries to each SAPSID_INSTANCE_NAMESYSTEM_NUMBER_logical-hostname file that is located in the SAP profile directory. Note that SAPSID is the SAP system identification, INSTANCE_NAME is the SAP instance name, and SYSTEM_NUMBER is the SAP system number.

      SAPLOCALHOST=logical-hostname

      SAPLOCALHOSTFULL=logical-hostname.domain

    5. Replace the physical host name with the logical host name in the file /usr/sap/SAPSID/INSTANCE_NAME/igs/conf/igs.xml. Note that SAPSID is the SAP system identification and INSTANCE_NAME is the SAP instance name.

  11. Modify the parameter enq/serverhost in the SAP instance profile.

    After installation, the parameter enq/serverhost in the SAP instance profile is set to the physical host name. Modify this parameter to contain the name of the logical host on which the SAP enqueue server will be running.

  12. If you are using the SAP J2EE engine, modify the SAP J2EE engine settings to reference the logical host name.

    1. Determine the location of the configuration scripts.

      • If the ABAP engine component is installed without the SAP J2EE engine component, or if the SAP J2EE engine component is installed as a stand-alone component, the scripts are located in the directory /usr/sap/SAPSID/JCINSTANCE_NUMBER/j2ee/configtool.

      • If The ABAP engine component is installed with the SAP J2EE engine, the scripts are located in the directory /usr/sap/SAPSID/DVEBMGSINSTANCE_NUMBER/j2ee/configtool.

    2. Run the configtool.sh script, which is located in the directory that was determined in Step a. Use this script to change all occurrences of a physical host name to the corresponding logical host name. This action includes setting the instance host and the JDBC URL to point to the logical host for the database.

    3. Bring online the database with the logical host for the database.

    4. Use the SAP configuration tool to modify the settings in the remaining steps of this procedure.

      To start the SAP configuration tool, you can use the script offlinecfgeditor.sh, which is located in the directory that was determined in Step a.

    5. In the LockingManager section, modify enqu.host to refer to the logical host name for the SAP enqueue server. Change this entry under all the settings (the general and the instance-specific).

    6. In the LockingManager section, modify all occurrences of enq.profile.filename to use the logical host name. Change this entry under all the settings (the general and the instance-specific).

      For example, change SAPSID_JCINSTANCE_NUMBER_physicalhost to SAPSID_JCINSTANCE_NUMBER_logicalhost. The new file name should be the same as the file name in the file /sapmnt/SAPSID/profile.

    7. In the ClusterManager section, change instance.ms.host to refer to the logical host name for the SAP message server. Change this entry under all the settings (the general and the instance-specific).

    8. Modify the instance.properties.IDxxxxxx to refer to the logical host.

      For each instance.properties.IDxxxxxx, modify all occurrences of a physical host name to the corresponding logical host name.

    9. Ensure that the enqu.port parameter and the URL in the dbpool parameter have the correct settings.

ProcedureHow to Modify the Installation for a Scalable SAP Web Application Server Component

The SAP web application server component of the SAP Web Application Server platform can be configured either as a failover resource or as a scalable resource.

Steps
  1. On each node on which you plan to run the scalable SAP web application server component resource group, create a local file system.

    This file system can be defined as you choose, as in the following example.


    # mkdir /usr/sap/local/SAPSID/INSTANCE_NAME
    

    Note that SAPSID represents the SAP system identification and INSTANCE_NAME represents the name of the SAP web application server instance.

  2. Copy the dialog instance from the node where it was installed to the local file systems on the other nodes.

  3. Create symbolic links to the dialog instance.

    On each node, create a symbolic link to the local file system from the required directory path for the installation, as in the following example.


    # ln -s  /usr/sap/local/SAPSID/INSTANCE_NAME \ 
    /usr/sap/SAPSID/INSTANCE_NAME
    
  4. Become the SAP administration user sapsidadm in order to perform the remaining steps in this procedure.

    • If the SAP Web Application Server software was installed on the global file system, perform the remaining steps on the node where the software was installed.

    • If the SAP Web Application Server software was installed on the local file systems, perform the remaining steps on each node on which you plan to run the scalable SAP web application server component resource group.

  5. Update the script $HOME/loghost to return the physical host name.

    A scalable resource group does not contain a logical host. Therefore, if a resource group for the SAP web application server component is configured to be scalable, you must update the script $HOME/loghost to return the physical host name. In the following example, D84 is the full name of the dialog instance.


    if [ "$1" = "D84" ]; then
      echo `hostname`; 
    fi
  6. Update the SAP start and stop scripts with unique names for the log files.

    When the SAP web application server component resource group is configured to be scalable, multiple instances of the application can be running simultaneously on different nodes. If all instances write to the same log file, they overwrite previously written information. Therefore, change the names of the log files that are specified in the SAP start and stop scripts so that they have unique names. Renaming the log files ensures that each node writes to a unique file. In the following example, the node name is appended to the log file name.

    Example of entry in script before updating:

    LOGFILE=$R3S_LOGDIR/`basename ${0}_${INSTANCE}.log`

    Example of entry in script after updating:

    LOGFILE=$R3S_LOGDIR/`basename ${0}_${INSTANCE}`_`uname -n`.log

  7. Make sure that the parameter enq/serverhost in the SAP instance profile contains the name of the logical host on which the SAP enqueue server is running.

  8. Verify the instance parameters.

    Start the configuration tool with the script offlinecfgeditor.sh, which is located in the directory /usr/sap/SAPSID/JCINSTANCE_NUMBER/j2ee/configtool.

    • Ensure that the cluster_data instance parameter is set to Propertysheet instance.properties.IDxxxxxx.

    • Ensure that instance.ms.host is set to the logical host name.

ProcedureHow to Enable the SAP Web Application Server to Run in a Cluster

The following resource groups are created in this procedure:

Note that the procedure to enable the SAP J2EE engine to run in a cluster is located in a separate section. See How to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster.

Steps
  1. Become superuser on a cluster node.

  2. Create a resource group for the SAP central services.

    The SAP central services resource group is a failover resource group to contain the SAP enqueue server resource, the SAP message server resource, and the logical host name for these resources.


    # scrgadm -a  -g central-rg
    
    -a

    Specifies that a new resource group is to be added.

    -g central-rg

    Specifies the name of the resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster.

  3. Add a logical-host-name resource to the resource group that you created in Step 2.


    # scrgadm -a -L -g central-rg  -l central-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g central-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 2.

    -l central-logical-hostname

    Specifies the logical-host name of the SAP central services resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

  4. Bring online the SAP central services resource group.


    # scswitch -Z  -g central-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 2.

  5. Create a resource group for the SAP replica server.

    The SAP replica server resource group is a failover resource group to contain the SAP replica server resource and the logical host name for this resource.


    # scrgadm -a  -g repl-rg
    
    -a

    Specifies that a new resource group is to be added.

    -g repl-rg

    Specifies the name of the resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster.

  6. Add a logical-host-name resource to the resource group that you created in Step 5.


    # scrgadm -a -L -g repl-rg  -l saprepl-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g repl-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 5.

    -l saprepl-logical-hostname

    Specifies the logical-host name of the SAP replica server resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

  7. Bring online the SAP replica server resource group.


    # scswitch -Z  -g repl-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g repl-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 5.

  8. Set weak positive affinity between the SAP central services resource group and the SAP replica server resource group.

    The weak positive affinity setting ensures that, in case of failover, the SAP central services resource group fails over to the node where the SAP replica server resource group has been running.


    # scrgadm -c  -g central-rg  -y RG_affinities=+repl-rg
    
    -c

    Specifies that a resource group is to be modified

    -g central-rg

    Specifies the name of the resource group to be modified

    -y RG_affinities=+repl-rg

    Specifies that the central-rg resource group has weak positive affinity with the repl-rg resource group

  9. If the SAP central services resource group and the SAP replica server resource group are online on the same node, switch one of them to another node.

    The two resource groups must be mastered on different nodes before the strong negative affinity can be set between the resource groups.


    # scswitch -z  -g rg  -h node
    
    -z

    Specifies that a resource group is to be switched to another node.

    -g rg

    Specifies the name of the resource group to be switched. This resource group can be either the SAP central services resource group or the SAP replica server resource group.

    -h node

    Specifies the node to which the resource group is to be switched.

  10. Set strong negative affinity between the SAP replica server resource group and the SAP central services resource group.

    The strong negative affinity setting ensures that node failover behavior is appropriate. The SAP central services resource group fails over to the node where the SAP replica server resource group has been running. The SAP replica server resource group then fails over to another available node.

    The SAP replica server resource group is never brought online nor allowed to remain online on a node on which the SAP central services resource group is online.


    # scrgadm -c  -g repl-rg  -y RG_affinities=--central-rg
    
    -c

    Specifies that a resource group is to be modified

    -g repl-rg

    Specifies the name of the resource group to be modified

    -y RG_affinities=--central-rg

    Specifies that the repl-rg resource group has strong negative affinity with the central-rg resource group

  11. Create a resource group for the SAP web application server component.

    The SAP web application server resource group can be configured as a failover or scalable resource group to contain the resource for the SAP web application server component. If the SAP web application server is configured as a failover resource, the logical host name for this resource is also contained in the SAP web application server resource group.

    • To create a failover resource group, run the following command.


      # scrgadm -a  -g webas-rg
      
    • To create a scalable resource group, run the following command.


      # scrgadm -a  -g scalwebas-rg \
      -y Maximum_primaries=value  -y Desired_primaries=value
      
    -a

    Specifies that a new resource group is to be added.

    -g webas-rg

    Specifies the name of the failover resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster.

    -g scalwebas-rg

    Specifies the name of the scalable resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster.

    -y Maximum_primaries=value

    Specifies the maximum number of primary nodes for this scalable resource group.

    -y Desired_primaries=value

    Specifies the desired number of primary nodes for this scalable resource group.

  12. If the resource group that you created in Step 11 is configured as a failover resource group, add a logical-host-name resource to the resource group.

    If the resource group that you created in Step 11 is configured as a scalable resource group, skip this step.


    # scrgadm -a -L -g webas-rg  -l webas-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g webas-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 11.

    -l webas-logical-hostname

    Specifies the logical-host name of the SAP web application server component resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

  13. Bring online the SAP web application server resource group.


    # scswitch -Z  -g webas-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g webas-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 11.

  14. (Optional) Consider configuring your cluster to off-load noncritical resource groups.

    You might plan to run a noncritical, lower-priority SAP web application server component resource on a node to which a critical, higher-priority SAP central services resource can fail over. In this situation, consider setting strong negative affinity between the resource groups. This setting ensures that, if a higher-priority SAP central services resource fails over to the node where a lower-priority SAP web application server component resource is running, the lower-priority resource is off-loaded, thereby automatically freeing the node's resources to be used for the critical SAP central services resource.


    # scrgadm -c  -g webas-rg  -y RG_affinities=--central-rg
    
    -c

    Specifies that a resource group is to be modified.

    -g webas-rg

    Specifies the name of the resource group to be modified.

    -y RG_affinities=--central-rg

    Specifies that the webas-rg resource group has strong negative affinity with the central-rg resource group. If the central-rg resource group fails over to the node where the webas-rg resource group is running, the webas-rg resource group is off-loaded.

  15. Copy all system files that were changed during the SAP Web Application Server installation and configuration process to all the nodes that are to run the SAP Web Application Server resources. These files might include the following:

    • /etc/passwd

    • /etc/group

    • /etc/system

    • /etc/services

ProcedureHow to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster

Steps
  1. Create a resource group for the SAP J2EE engine.

    The SAP J2EE engine resource group can be configured as a failover or scalable resource group to contain the resource for the SAP J2EE engine. If the SAP J2EE engine is configured as a failover resource, the logical host name for this resource is also contained in this resource group.

    • To create a failover resource group, run the following command.


      # scrgadm -a  -g j2ee-rg
      
    • To create a scalable resource group, run the following command.


      # scrgadm -a  -g j2ee-rg \
      -y Maximum_primaries=value  -y Desired_primaries=value
      
    -a

    Specifies that a new resource group is to be added.

    -g j2ee-rg

    Specifies the name of the resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster. Use this name when configuring the SAP J2EE engine resource in Step 4 in How to Register and Configure a Stand-Alone SAP J2EE Engine Resource.

    -y Maximum_primaries=value

    Specifies the maximum number of primary nodes for the scalable resource group.

    -y Desired_primaries=value

    Specifies the desired number of primary nodes for the scalable resource group.

  2. If the resource group that you created in Step 1 is configured as a failover resource group, add a logical-host-name resource to the resource group.

    If the resource group that you created in Step 1 is configured as a scalable resource group, skip this step.


    # scrgadm -a -L -g j2ee-rg  -l j2ee-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g j2ee-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 1.

    -l j2ee-logical-hostname

    Specifies the logical-host name of the SAP J2EE engine resource. Use this name when configuring the SAP J2EE engine resource in Step 4 in How to Register and Configure a Stand-Alone SAP J2EE Engine Resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

  3. Bring online the SAP J2EE engine resource group.


    # scswitch -Z  -g j2ee-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g j2ee-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 1.

Verifying the SAP Web Application Server Installation and Configuration

Before you install the Sun Cluster HA for SAP Web Application Server packages, verify that the SAP Web Application Server software is correctly installed and configured to run in a cluster. These procedures do not verify that the SAP Web Application Server application is highly available because you have not yet installed your data service.


Note –

See Appendix B, “SAP Web AS Compliance Tests,” of SAP Web Application Server in Switchover Environments, UNIX Platforms, This appendix describes in detail the recommended tests to verify the functionality of the SAP Web Application Server software.


The procedures in this section verify the installation and configuration of the following SAP Web Application Server components.

ProcedureHow to Verify the Installation and Configuration of the SAP Enqueue Server and the SAP Replica Server

Perform this procedure on each set of two nodes that can master the SAP central services resource group and the SAP replica server resource group.

For a description of the extension properties for the SAP enqueue server resource type, SUNW.sapenq, see SUNW.sapenq Extension Properties. For a description of the extension properties for the SAP replica server resource type, SUNW.saprepl, see SUNW.saprepl Extension Properties.

Steps
  1. Become the superuser on one node, Node1.

  2. Bring the SAP central services resource group online on Node1.


    # scswitch -z  -g central-rg -h node1
    
    -z

    Specifies that a resource group is to be brought online

    -g central-rg

    Specifies the name of the resource group to be brought online

    -h node1

    Specifies the name of the node on which the resource group is to be brought online

  3. Become the administration user for the SAP enqueue server on Node1.

    The extension property SAP_User for the SUNW.sapenq resource type specifies the name of the administration user.

  4. Start the SAP enqueue server manually on Node1.


    # enq_server_cmd pf=enq_profile
    
    enq_server_cmd

    Specifies the full path to the SAP enqueue server executable. The extension property Enqueue_Server for the SUNW.sapenq resource type contains this value. The name of the SAP enqueue server executable file is enserver.

    pf=enq_profile

    Specifies the full path to the profile for the SAP enqueue server. The extension property Enqueue_Profile for SUNW.sapenq resource type contains this value.

  5. Confirm that the SAP enqueue server is up on Node1.

    The name of the SAP enqueue server executable file is enserver.


    # ps -ef | grep enserver
    
  6. Verify that the SAP enqueue server has started correctly.

    You can verify that the SAP enqueue server has started correctly in two ways.

    • Run the SAP utility ensmon.


      # ensmon -H localhost -S port 1
      
      -H localhost

      Specifies that the name of the host is localhost.

      -S port

      Specifies the enqueue port.

      1

      Specifies that the probe should check the SAP enqueue server only.

      If this command is run on the command line, a return code is returned on the command line.

    • Check the log files that are written to the directory that was current when the SAP enqueue server command was run.

  7. On a different node, Node2, log in as superuser.

  8. Bring the SAP replica server resource group online on Node2.


    # scswitch -z -g repl-rg -h node2
    
    -z

    Specifies that a resource group is to be brought online

    -g repl-rg

    Specifies the name of the resource group to be brought online

    -h node2

    Specifies the name of the node on which the resource group is to be brought online

  9. Become the administration user for the SAP replica server on Node2.

    The extension property SAP_User for SUNW.saprepl resource type specifies the name of the administration user.

  10. Start the SAP replica server manually on Node2.


    # repl_server_cmd pf=repl_profile
    
    repl_server_cmd

    Specifies the full path to the SAP replica server executable. The extension property Replica_Server for the SUNW.saprepl resource type contains this value. The name of the SAP replica server executable file is enrepserver.

    pf=repl_profile

    Specifies the full path to the profile for the SAP replica server. The extension property Replica_Profile for the SUNW.saprepl resource type contains this value.

  11. Confirm that the SAP replica server is active on Node2.

    The name of the SAP replica server executable file is enrepserver.


    # ps -ef | grep enrepserver
    
  12. Verify that the SAP replica server has started correctly.

    You can verify that the SAP replica server has started correctly in two ways.

    • Run the SAP utility ensmon.


      # ensmon -H localhost -S port 2
      
      -H localhost

      Specifies that the name of the host is localhost.

      -S port

      Specifies the enqueue port.

      2

      Specifies that the probe should check both the SAP enqueue server and the SAP replica server.

      If this command is run on the command line, a return code is returned on the command line.

    • Check the log files that are written to the directory that was current when the SAP replica server command was run.

  13. Set up a test profile to be used with the enqt utility.

    In order to create and check enqueue lock entries in Step 14, you must prepare entries in a test SAP profile, including SAPSYSTEM, SAPSYSTEMNAME, and INSTANCE_NAME.

    See the SAP document The SAP Lock Concept (BC-CST-EQ) for details about all profile parameters. See also SAP Web Application Server in Switchover Environments, UNIX Platforms.

  14. Confirm that enqueue replication is working by performing the following steps.

    1. Create some enqueue lock entries.


      # /usr/sap/SAPSID/SYS/exe/run/enqt pf=app_server_profile 11
      
      SAPSID

      SAP system ID

      app_server_profile

      Specifies the full path to the test SAP profile that you set up in Step 13

    2. Stop the SAP enqueue server on Node1.


      # ps -ef | grep enserver
      # kill -9 pid
      
    3. Stop the SAP replica server on Node2.


      # ps -ef | grep enrepserver
      # kill -9 pid
      
    4. Bring the SAP central services resource group online on Node2.


      # scswitch -z -g central-rg -h node2
      
    5. Become the administration user for the SAP enqueue server on Node2.

    6. Start the SAP enqueue server manually on Node2.


      # enq_server_cmd pf=enq_profile
      
    7. Confirm that no enqueue entries are lost.


      # /usr/sap/SAPSID/SYS/exe/run/enqt pf=app_server_profile 20
      
      SAPSID

      SAP system ID.

      app_server_profile

      Specifies the full path to the test SAP profile that you set up in Step 13.

ProcedureHow to Verify That the Configuration for the SAP Message Server Is Correct for the Data Service

Perform this procedure on each node that can master the SAP central services resource group.

For a description of the extension properties for the SAP message server resource type, SUNW.sapscs, see SUNW.sapscs Extension Properties.

Steps
  1. Bring the SAP central services resource group online on a node.


    # scswitch -z  -g central-rg -h node
    
    -z

    Specifies that a resource group is to be brought online

    -g central-rg

    Specifies the name of the resource group to be brought online

    -h node

    Specifies the name of the node on which the resource group is to be brought online

  2. Become superuser with superuser environment. Then become the sapsidadm user, while retaining the superuser environment.

    Note that, in the first su command, the “dash” (-) argument causes the environment to be changed to the environment of superuser. The second su command, which is used without the “dash” argument, causes the environment to be retained.


    # su - root
    # su sapsidadm
    
  3. Set the following environment variables:

    • Set the LD_LIBRARY_PATH variable to /sapmnt/SAPSID/exe.

    • Set the SAPSYSTEMNAME variable to the appropriate SAP system identification.

    • Add the following paths to the PATH variable: /usr/sbin:/usr/bin:/usr/cluster/bin.

    • Set the SAPSYSTEM variable to the system number configured for the specific instance of SAP which should be handled by the resource.

    • Set the HOME environment variable to the home directory of the SAP administration user.

    • Set the LOGNAME variable to root.

  4. Run the SAP start script for the SAP message server using the absolute path and the appropriate arguments.

    The following command is an example that runs the SAP start script for the SAP message server. You must run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/startsap r3 SCS01
    
  5. After the SAP system starts successfully, run the fault monitor probe for the SAP message server.

    The full path to the probe is specified by the extension property Msg_Server_Monitor for the SUNW.sapscs resource type. For example, type the following command or the equivalent command.


    # /usr/sap/SC3/SYS/exe/run/msprot -mshost host -msport port
    
  6. Verify that the probe was successful.

    The probe is successful when the return code equals zero.

  7. Run the SAP stop script for the SAP message server to verify that the SAP message server can be stopped.

    Verify that the SAP message server can be stopped correctly. Run the SAP stop script for the SAP message server with the full path and the appropriate arguments. The following command is an example that runs the SAP stop script. Run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/stopsap r3 SCS01
    

ProcedureHow to Verify That the Configuration for the SAP Web Application Server Component Is Correct for the Data Service

Perform the following procedure on each node that can master the resource group for the SAP web application server component.

If the SAP web application server component is configured as a scalable resource, the resource runs on all these nodes simultaneously. Therefore, you must execute this procedure on all nodes that can simultaneously master the scalable SAP web application server component resource.

Steps
  1. If you have configured the resource group for the SAP web application server component as a failover resource group, enable the logical-host-name resource for the resource group.

  2. On the node where the logical-host-name resource is enabled, become superuser, then the sapsidadm user with superuser environment.


    # su - root
    # su sapsidadm
    
  3. Set the following environment variables:

    • Set the LD_LIBRARY_PATH variable to /sapmnt/SAPSID/exe.

    • Set the SAPSYSTEMNAME variable to the appropriate SAP system identification.

    • Add the following paths to the PATH variable: /usr/sbin:/usr/bin:/usr/cluster/bin.

    • Set the SAPSYSTEM variable to the system number configured for the specific instance of SAP which should be handled by the resource.

    • Set the HOME environment variable to the home directory of the SAP administration user.

    • Set the LOGNAME variable to root.

  4. Start the database.

    Before running the SAP start script in the next step, you must start the database.

  5. Run the SAP start script for the SAP web application server component using the absolute path and the appropriate arguments.

    The following command is an example that runs the SAP start script for the SAP web application server component. You must run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/startsap r3 D01
    
  6. Change to the home directory of the SAP administration user.

    The dpmon utility writes files to the current directory, and this directory must be writable by the SAP administration user. In Step 3 you set the HOME environment variable to the home directory of the SAP administration user.


    # cd $HOME
    
  7. After the SAP system starts successfully, run the probe command for the dispatcher of the SAP instance. The following command is an example:


    # /usr/sap/SC3/SYS/exe/run/dpmon -info
    
  8. Verify that the probe was successful.

    The probe is successful when the return code equals zero.

  9. Run the SAP stop script for the SAP web application server component to verify that the SAP Web Application Server can be stopped.

    Verify that the SAP Web Application Server can be stopped correctly. Run the SAP stop script for the SAP web application server component with the full path and the appropriate arguments. The following command is an example that runs the SAP stop script. Run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/stopsap r3 D01
    

ProcedureHow to Verify the Installation and Configuration of the SAP J2EE Engine

Perform the following procedure on each node that can master the resource group for the SAP J2EE engine.

If the SAP J2EE engine is configured as a scalable resource, the resource runs on all these nodes simultaneously. Therefore, you must execute this procedure on all nodes that can simultaneously master the scalable SAP J2EE engine resource.

Steps
  1. If you have configured the resource group for the SAP J2EE engine as a failover resource group, enable the logical-host-name resource for the resource group.

  2. On the node where the logical-host-name resource is enabled, become superuser, then the sapsidadm user with superuser environment.


    # su - root
    # su sapsidadm
    
  3. Set the following environment variables:

    • Set the LD_LIBRARY_PATH variable to /sapmnt/SAPSID/exe.

    • Set the SAPSYSTEMNAME variable to the appropriate SAP system identification.

    • Add the following paths to the PATH variable: /usr/sbin:/usr/bin:/usr/cluster/bin.

    • Set the SAPSYSTEM variable to the system number configured for the specific instance of SAP which should be handled by the resource.

    • Set the HOME environment variable to the home directory of the SAP administration user.

    • Set the LOGNAME variable to root.

  4. Start the database.

    Before running the SAP start script in the next step, you must start the database.

  5. Run the SAP start script for the SAP J2EE engine using the absolute path and the appropriate arguments.

    The following command is an example that runs the SAP start script for the SAP J2EE engine. You must run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/startsap j2ee D01
    
  6. Change to the home directory of the SAP administration user.

    The probe utility writes files to the current directory, and this directory must be writable by the SAP administration user. In Step 3 you set the HOME environment variable to the home directory of the SAP administration user.


    # cd $HOME
    
  7. After the SAP J2EE engine starts successfully, verify it by deploying and running some examples. See the SAP Web Application Server Installation Guide for instructions.

  8. Run the SAP stop script for the SAP J2EE engine to verify that the SAP J2EE engine can be stopped.

    Verify that the SAP J2EE engine can be stopped correctly. Run the SAP stop script for the SAP J2EE engine with the full path and the appropriate arguments. The following command is an example that runs the SAP stop script. Run the equivalent command for your installation.


    # /usr/sap/SC3/SYS/exe/run/stopsap j2ee D01
    

Installing the Sun Cluster HA for SAP Web Application Server Packages

The Sun Cluster HA for SAP Web Application Server data service includes resource types for the following components of SAP Web Application Server:

If you did not install the Sun Cluster HA for SAP Web Application Server packages during your initial Sun Cluster installation, perform this procedure to install the packages. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for SAP Web Application Server packages. To complete this procedure, you need the Sun Cluster Agents CD.

If you are installing more than one data service simultaneously, perform the procedure in Installing the Software in Sun Cluster Software Installation Guide for Solaris OS.

Install the Sun Cluster HA for SAP Web Application Server packages by using one of the following installation tools:


Note –

If you are using Solaris 10, install these packages only in the global zone. To ensure that these packages are not propagated to any local zones that are created after you install the packages, use the scinstall utility to install these packages. Do not use the Web Start program.


ProcedureHow to Install the Sun Cluster HA for SAP Web Application Server Packages by Using the Web Start Program

You can run the Web Start program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar. For more information about the Web Start program, see the installer(1M) man page.

Steps
  1. On the cluster node where you are installing the Sun Cluster HA for SAP Web Application Server packages, become superuser.

  2. (Optional) If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Insert the Sun Cluster Agents CD into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom/cdrom0 directory.

  4. Change to the Sun Cluster HA for SAP Web Application Server component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for SAP Web Application Server data service resides in this directory.


    # cd /cdrom/cdrom0/components/SunCluster_HA_SAPWebAS_1.0
    
  5. Start the Web Start program.


    # ./installer
    
  6. When you are prompted, select the type of installation.

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  7. Follow the instructions on the screen to install the Sun Cluster HA for SAP Web Application Server packages on the node.

    After the installation is finished, the Web Start program provides an installation summary. This summary enables you to view logs that the Web Start program created during the installation. These logs are located in the /var/sadm/install/logs directory.

  8. Exit the Web Start program.

  9. Remove the Sun Cluster Agents CD from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      
Next Steps

Go to Registering and Configuring Sun Cluster HA for SAP Web Application Server.

ProcedureHow to Install the Sun Cluster HA for SAP Web Application Server Packages by Using the scinstall Utility

Perform this procedure on all of the cluster members that can master Sun Cluster HA for SAP Web Application Server.

Before You Begin

Ensure that you have the Sun Cluster Agents CD.

Steps
  1. Load the Sun Cluster Agents CD into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Select the menu option, Add Support for New Data Service to This Cluster Node.

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Cluster Agents CD.

    The utility refers to the CD as the “data services cd.”

  5. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  6. Exit the scinstall utility.

  7. Unload the CD from the drive.

Next Steps

Go to Registering and Configuring Sun Cluster HA for SAP Web Application Server.

Registering and Configuring Sun Cluster HA for SAP Web Application Server

To enable the Sun Cluster HA for SAP Web Application Server data service to make SAP Web Application Server applications highly available, configure the data service as described in the procedures in this section. These procedures perform the following tasks.

The resource groups were created in How to Enable the SAP Web Application Server to Run in a Cluster and in How to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster.

Before You Begin

Before performing these procedures, ensure that the Sun Cluster HA for SAP Web Application Server data service packages are installed.

The procedures in this section assume that the database resources have been previously created and that these resources are online.

Perform these procedures as superuser on a cluster node.

Setting Sun Cluster HA for SAP Web Application Server Extension Properties

The extension properties for Sun Cluster HA for SAP Web Application Server are described in Appendix A, Sun Cluster HA for SAP Web Application Server Extension Properties.

You can update some extension properties dynamically. You can update other properties, however, only when you create or disable a resource. The Tunable entry indicates when you can update a property.

The instructions for registering and configuring resources explain how to set only extension properties that Sun Cluster HA for SAP Web Application Server requires you to set.

To set an extension property of a resource, include the following option in the scrgadm(1M) command that creates or modifies the resource:


-x property=value 
-x property

Identifies the extension property that you are setting

value

Specifies the value to which you are setting the extension property

You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.

ProcedureHow to Register and Configure HAStoragePlus Resources for the SAP Central Services Components

An HAStoragePlus resource is created to ensure the high availability of the global device groups where the components are installed.

Steps
  1. Register the SUNW.HAStoragePlus resource type.


    # scrgadm -a -t SUNW.HAStoragePlus
    
  2. Create an HAStoragePlus resource for the global device group on which the SAP enqueue server and the SAP message server are installed.

    Create this resource in the SAP central services resource group, which is the resource group to which the SAP enqueue server and the SAP message server resources belong.


    # scrgadm -a -j hsp-central-rs -g central-rg -t SUNW.HAStoragePlus \
    -x filesystemmountpoints="mountpoint-list" \
    -x globaldevicepaths=sapenq-device-group
    
    -a

    Specifies that a new configuration is to be added.

    -j hsp-central-rs

    Specifies the name of the resource that you are creating.

    -g central-rg

    Specifies that the resource is to be added to the SAP central services resource group.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -x filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

    -x globaldevicepaths=sapenq-device-group

    Specifies the name of the global device group on which the SAP enqueue server software and the SAP message server software are installed.

  3. Enable the HAStoragePlus resource that you created in Step 2.


    # scswitch -ej hsp-central-rs
    
    -ej hsp-central-rs

    Specifies that the HAStoragePlus resource that you created in Step 2 is to be enabled

  4. Create an HAStoragePlus resource for the global device group on which SAP replica server is installed.

    Create this resource in the SAP replica server resource group.


    # scrgadm -a -j hsp-repl-rs -g repl-rg -t SUNW.HAStoragePlus \
    -x filesystemmountpoints="mountpoint-list" \
    -x globaldevicepaths=saprepl-device-group
    
    -a

    Specifies that a new configuration is to be added.

    -j hsp-repl-rs

    Specifies the name of the resource that you are creating.

    -g repl-rg

    Specifies that the resource is to be added to the SAP replica server resource group.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -x filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

    -x globaldevicepaths=saprepl-device-group

    Specifies the name of the global device group on which the SAP replica server software is installed.

  5. Enable the HAStoragePlus resource that you created in Step 4.


    # scswitch -ej hsp-repl-rs
    
    -ej hsp-repl-rs

    Specifies that the HAStoragePlus resource that you created in Step 4 is to be enabled

ProcedureHow to Register and Configure an SAP Enqueue Server Resource

The SAP enqueue server resource and the SAP message server resource must be in the same failover resource group because they fail over together.

The SAP enqueue server resource is configured to depend on its associated HAStoragePlus resource. This dependency ensures that the SAP enqueue server does not attempt to start until its associated HAStoragePlus resource is online.

Steps
  1. Register SUNW.sapenq, the resource type for the SAP enqueue server.


    # scrgadm -a  -t SUNW.sapenq
    
    -a

    Specifies that a new resource type is to be added.

    -t SUNW.sapenq

    Specifies the name of the resource type to be added. This name is predefined for the SAP enqueue server.

  2. Create an SAP enqueue server resource in the SAP central services resource group.


    # scrgadm -a -j enq-rs -g central-rg -t SUNW.sapenq \
    -x Enqueue_Profile=path-to-enq-profile \
    -x Enqueue_Server=path-to-enq-server-binary \
    -x SAP_User=enq-user \
    -x Enqueue_Instance_Number=enq-instance \
    -y Resource_Dependencies=hsp-central-rs
    
    -a

    Specifies that a new resource is to be added.

    -j enq-rs

    Specifies the name of the resource to be added.

    -g central-rg

    Specifies the resource group to which the resource is to be added. The SAP central services resource group is configured as a failover resource group.

    -t SUNW.sapenq

    Specifies that the resource is an instance of the SUNW.sapenq resource type.

    -x Enqueue_Profile=path-to-enq-profile

    Specifies the full path to the SAP enqueue server profile.

    -x Enqueue_Server=path-to-enq-server-binary

    Specifies the full path to the SAP enqueue server executable.

    -x SAP_User=enq-user

    Specifies the administration user for the SAP enqueue server.

    -x Enqueue_Instance_Number=enq-instance

    Specifies the two-digit instance number for the SAP enqueue server. This number is the value of SAPSYSTEM in the SAP profile for SAP enqueue server.

    -y Resource_Dependencies=hsp-central-rs

    Specifies that the HAStoragePlus resource for the global device group on which SAP enqueue server is installed must be online in order for the SAP enqueue server to be online.

  3. Verify that the default values for the SAP enqueue server extension properties are acceptable.

    Refer to SUNW.sapenq Extension Properties.

  4. Ensure that SAP enqueue server is not already running on the cluster.

    If SAP enqueue server is already running on any node of the cluster, you risk the simultaneous running of multiple SAP enqueue server processes.

  5. Enable the SAP enqueue server resource.


    # scswitch -ej enq-rs
    
    -ej

    Specifies that the specified resource is to be enabled.

    enq-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure an SAP Replica Server Resource

The SAP replica server resource must be in a different failover resource group from the SAP enqueue server resource, because the SAP replica server resource must not fail over with the SAP enqueue server resource.

The SAP replica server resource is configured to depend on its associated HAStoragePlus resource being online. The SAP replica server resource also depends on the SAP enqueue server resource. These dependencies ensure that the SAP replica server does not attempt to start until both its associated HAStoragePlus resource and the SAP enqueue server are online.

Steps
  1. Register SUNW.saprepl, the resource type for the SAP replica server.


    # scrgadm -a  -t SUNW.saprepl
    
    -a

    Specifies that a new resource type is to be added.

    -t SUNW.saprepl

    Specifies the name of the resource type to be added. This name is predefined for the SAP replica server.

  2. Create an SAP replica server resource in the SAP replica server resource group.


    # scrgadm -a -j repl-rs -g repl-rg -t SUNW.saprepl \
    -x Replica_Profile=path-to-repl-profile \
    -x Replica_Server=path-to-repl-server-binary \
    -x SAP_User=repl-user \
    -y Resource_Dependencies=enq-rs,hsp-repl-rs
    
    -a

    Specifies that a new resource is to be added.

    -j repl-rs

    Specifies the name of the resource to be added.

    -g repl-rg

    Specifies the resource group to which the resource is to be added. The SAP replica server resource group is configured as a failover resource group.

    -t SUNW.saprepl

    Specifies that the resource is an instance of the SUNW.saprepl resource type.

    -x Replica_Profile=path-to-repl-profile

    Specifies the full path to the SAP replica server profile.

    -x Replica_Server=path-to-repl-server-binary

    Specifies the full path to the SAP replica server executable.

    -x SAP_User=repl-user

    Specifies the administration user for the SAP replica server.

    -y Resource_Dependencies=enq-rs,hsp-repl-rs

    Specifies that the following resources must be online before the SAP replica server resource can be online:

    • SAP enqueue server resource

    • HAStoragePlus resource for the global device group on which the SAP replica server is installed

  3. Verify that the default values for the SAP replica server extension properties are acceptable.

    Refer to SUNW.saprepl Extension Properties.

  4. Enable the SAP replica server resource.


    # scswitch -ej repl-rs
    
    -ej

    Specifies that the specified resource is to be enabled.

    repl-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure an SAP Message Server Resource

The SAP enqueue server resource and the SAP message server resource must be in the same failover resource group because they fail over together.

The SAP message server resource is configured to depend on its associated HAStoragePlus resource. This dependency ensures that the SAP message server does not attempt to start until its associated HAStoragePlus resource is online.

Steps
  1. Register SUNW.sapscs, the resource type for the SAP message server.


    # scrgadm -a  -t SUNW.sapscs
    
    -a

    Specifies that a new resource type is to be added.

    -t SUNW.sapscs

    Specifies the name of the resource type to be added. This name is predefined for the SAP message server.

  2. Create an SAP message server resource in the SAP central services resource group.


    # scrgadm -a -j msg-rs -g central-rg -t SUNW.sapscs \
    -x SAP_SID=scs-system-ID \
    -x SAP_Instance_Number=scs-instance-number \
    -x SAP_Instance_Name=scs-instance-name \
    -x Msg_Server_Port=msg-server-port \
    -x Scs_Startup_Script=scs-server-startup-script \
    -x Scs_Shutdown_Script=scs-server-shutdown-script \
    -y Resource_Dependencies=hsp-central-rs
    
    -a

    Specifies that a new resource is to be added.

    -j msg-rs

    Specifies the name of the resource to be added.

    -g central-rg

    Specifies the resource group to which the resource is to be added. The SAP central services resource group is configured as a failover resource group.

    -t SUNW.sapscs

    Specifies that the SAP message server resource is an instance of the resource type that is named SUNW.sapscs.

    -x SAP_SID=scs-system-ID

    Specifies the SAP system ID for the SAP message server. This ID is SAPSYSTEMNAME in the SAP profile.

    -x SAP_Instance_Number=scs-instance-number

    Specifies the instance number for the SAP message server. This number is SAPSYSTEM in the SAP profile.

    -x SAP_Instance_Name=scs-instance-name

    Specifies the instance name for the SAP message server. This name is INSTANCE_NAME in the SAP profile.

    -x Msg_Server_Port=msg-server-port

    Specifies the listen port for the SAP message server.

    -x Scs_Startup_Script=scs-server-startup-script

    Specifies the full path to the startup script for the SAP message server instance.

    -x Scs_Shutdown_Script=scs-server-shutdown-script

    Specifies the full path to the shutdown script for the SAP message server instance.

    -y Resource_Dependencies=hsp-central-rs

    Specifies that the HAStoragePlus resource for the global device group on which the SAP message server is installed must be online in order for the SAP message server to be online.

  3. Verify that the default values for the SAP message server extension properties are acceptable.

    Refer to SUNW.sapscs Extension Properties.

  4. Enable the SAP message server resource.


    # scswitch -ej msg-rs
    
    -ej

    Specifies that the specified resource is to be enabled.

    msg-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure an SAP Web Application Server Component

An HAStoragePlus resource is created to ensure the high availability of the global device groups where the components are installed.

The resource for the SAP web application server component is configured to depend on its associated HAStoragePlus resource. The resource for the SAP web application server component also depends on the database resource, as well as the SAP message server resource. These dependencies ensure that the resource for the SAP web application server component does not attempt to start until its associated HAStoragePlus resource, the database, and the SAP message server resource are all online.


Note –

The SAP web application server component can be configured to run under PMF or not to run under PMF. See the extension property Webas_Use_Pmf in SUNW.sapwebas Extension Properties. If the component is configured to run under PMF control, and if the network is not available, PMF stops the resource in such a way that no data is lost. However, if the component is configured not to run under PMF, and if the network is not available, the resource and the resource group for the SAP web application server component are in the stop_failed state and user intervention is required. Because no SAP utility is available to stop all SAP processes, in order to prevent possible data corruption, the data service does not automatically restart the processes.


Steps
  1. Create an HAStoragePlus resource for the global device group on which SAP web application server component is installed.

    Create this resource in the SAP web application server resource group.


    # scrgadm -a -j hsp-webas-rs -g webas-rg -t SUNW.HAStoragePlus \
    -x filesystemmountpoints="mountpoint-list" \
    -x globaldevicepaths=sapwebas-device-group
    
    -a

    Specifies that a new configuration is to be added.

    -j hsp-webas-rs

    Specifies the name of the resource that you are creating.

    -g webas-rg

    Specifies that the resource is to be added to the SAP web application server resource group. This resource group can be failover or scalable.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -x filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

    -x globaldevicepaths=sapwebas-device-group

    Specifies the name of the global device group on which the SAP web application server component software is installed.

  2. Enable the HAStoragePlus resource that you created in Step 1.


    # scswitch -ej hsp-webas-rs
    
    -ej hsp-webas-rs

    Specifies that the HAStoragePlus resource that you created in Step 1 is to be enabled

  3. Register SUNW.sapwebas, the resource type for the SAP web application server component.


    # scrgadm -a  -t SUNW.sapwebas
    
    -a

    Specifies that a new resource type is to be added.

    -t SUNW.sapwebas

    Specifies the name of the resource type to be added. This name is predefined for the SAP web application server component.

  4. Create a resource for the SAP web application server component.

    The SAP web application server component can be configured either as a failover resource or as a scalable resource by adding the resource to a resource group that was created as a failover or a scalable resource group.


    # scrgadm -a -j webas-rs -g webas-rg -t SUNW.sapwebas \
    -x SAP_SID=webas-system-ID \
    -x SAP_Instance_Number=webas-instance-number \
    -x SAP_Instance_Name=webas-instance-name \
    -x Webas_Probe_J2ee=True \
    -y Resource_Dependencies=hsp-webas-rs,db-webas-rs,msg-rs
    
    -a

    Specifies that a new resource is to be added.

    -j webas-rs

    Specifies the name of the resource to be added.

    -g webas-rg

    Specifies the resource group to which the resource is to be added. The SAP web application server resource group can be configured as a failover or a scalable resource group.

    -t SUNW.sapwebas

    Specifies that the resource is an instance of the SUNW.sapwebas resource type.

    -x SAP_SID=webas-system-ID

    Specifies the SAP system ID for the SAP web application server component. This ID is SAPSYSTEMNAME in the SAP profile.

    -x SAP_Instance_Number=webas-instance-number

    Specifies the two-digit SAP system number for the SAP web application server component instance. This number is SAPSYSTEM in the SAP profile.

    -x SAP_Instance_Name=webas-instance-name

    Specifies the instance name for the SAP web application server component. This name is INSTANCE_NAME in the SAP profile.

    -x Webas_Probe_J2ee=True

    Specifies that the SAP J2EE engine is to be probed. This property must be set to True when the SAP J2EE engine is included.

    -y Resource_Dependencies=hsp-webas-rs,db-webas-rs,msg-rs

    Specifies that the following resources must be online before the resource for the SAP web application server component can be online:

    • HAStoragePlus resource for the global device group on which the SAP web application server component is installed.

    • Database resource. The database resource is created by the relevant data service.

    • SAP message server resource.

  5. Verify that the default values for the SAP web application server component extension properties are acceptable.

    Refer to SUNW.sapwebas Extension Properties.

  6. Enable the SAP web application server component resource.


    # scswitch -ej webas-rs
    
    -ej

    Specifies that the specified resource is to be enabled.

    webas-rs

    Specifies the name of the resource to be enabled.

ProcedureHow to Register and Configure a Stand-Alone SAP J2EE Engine Resource

Steps
  1. Become superuser on one of the nodes in the cluster that is to host the SAP J2EE engine.

  2. Register SUNW.gds, the resource type for the SAP J2EE engine.


    # scrgadm -a -t SUNW.gds
    
    -a

    Specifies that a new resource type is to be added.

    -t SUNW.gds

    Specifies the name of the resource type to be added. This name is predefined for the SAP J2EE engine.

  3. Create an HAStoragePlus resource for the SAP J2EE engine disk storage.


    # scrgadm -a -j hsp-j2ee-rs -g j2ee-rg -t SUNW.HAStoragePlus  \
    -x filesystemmountpoints="mountpoint-list"
    
    -a

    Specifies that a new configuration is to be added.

    -j hsp-j2ee-rs

    Specifies the name of the resource that you are creating.

    -g j2ee-rg

    Specifies that the resource is to be added to the SAP J2EE engine resource group.

    -t SUNW.HAStoragePlus

    Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.

    -x filesystemmountpoints="mountpoint-list"

    Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.

  4. Configure the Sun Cluster SAP J2EE engine resource.

    The configuration file for the SAP J2EE engine is /opt/SUNWscswa/util/ha_sap_j2ee_config.


    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    # 
    # This file will be sourced in by ha_sap_j2ee_register and the
    # parameters listed below will be used.
    #
    # These parameters can be customized in (key=value) form
    #
    #              RS - Name of the resource for the application
    #              RG - Name of the resource group containing RS
    #       JAVA_HOME - Name of the Java home directory
    #          SAPSID - The SAP System Name
    #   J2EE_INSTANCE - Name of the SAP J2EE Engine instance
    #              LH - Name of the LogicalHostname SC resource
    #    DEPENDENT_RS - Resources on which SAP J2EE SC resource depends
    # 	      for example, HAStoragePlus, SCS, ENQ, and DB SC resources
    #	 SCALABLE - Scalable or not. TRUE/FALSE
    #	
    #
    # Optional parameters
    #
    # SAP_START - Optional, name of a startsap script within
    #	 SAPSIDadm home directory that will be used
    #	 instead of the default startsap.
    #
    #	 SAP_STOP  - Optional, name of a stopsap script within
    #	 SAPSIDadm home directory that will be used
    #	 instead of the default stopsap.
    #
    #	 SAP_LOGDIR - Optional, where to put the logfiles from
    #	 startsap and stopsap. Default is the SAPSIDadm home
    # directory.
    #	 SAPSIDadm must be owner and have write permissions
    #
    #	 RESOURCE_PROJECT_NAME - Optional, name of a SRM project.
    #
    # The following examples illustrate sample parameters
    # for SAP J2EE Engine Instance
    #
    #	 RS=RES-SAP-J2EE
    #	 RG=RG-SAP-J2EE
    #	 JAVA_HOME=/usr/java
    #	 SAPSID=TST
    #	 J2EE_INSTANCE=JC00
    #	 LH=j2eelh           For Scalable, LH= 
    #	 DEPENDENT_RS=RES-SAP-J2EE-HAS,RES-SAP-SCS,RES-SAP-ENQ,RES-SAP-DB
    #
    #	 SAP_START=
    #	 SAP_STOP=
    #	 SAP_LOGDIR=
    #	 RESOURCE_PROJECT_NAME=
    #	 SCALABLE=FALSE      For Scalable, SCALABLE=TRUE
    #
    #
    RS=
    RG=
    JAVA_HOME=
    SAPSID=
    J2EE_INSTANCE=
    LH=
    DEPENDENT_RS=
    SAP_START=
    SAP_STOP=
    SAP_LOGDIR=
    RESOURCE_PROJECT_NAME=
    SCALABLE=

    The SAP J2EE engine can be configured as a failover resource or as a scalable resource. You can edit the ha_sap_j2ee_config file as follows.

    • If the resource is scalable, set SCALABLE=TRUE and set LH to null (LH= ).

    • If the resource is failover, set SCALABLE=FALSE and set LH=logical-host resource.

    • Set the resource dependencies.

      Set DEPENDENT_RS=db-rs,enq-rs,msg-rs.

      Before the SAP J2EE engine resource can be online, the following resources must be online:

      • Database resource. The database resource is created by the relevant data service.

      • SAP enqueue server resource.

      • SAP message server resource.

    • If SAP_LOGDIR is specified, the file must have ownership and write permissions set for the sapsidadm user.

  5. Register the Sun Cluster SAP J2EE engine resource.


    # cd /opt/SUNWscswa/util 
    # ./ha_sap_j2ee_register
    
  6. Enable the Sun Cluster SAP J2EE engine resource.


    # scswitch -ej j2ee-rs 
    
    -ej

    Specifies that the specified resource is to be enabled.

    j2ee-rs

    Specifies the name of the resource to be enabled.

Registering More Than One Resource

The ha_sap_j2ee_conf configuration file and the ha_sap_j2ee_register registration script can register only one resource at a time. If you want to register more resources of this type, either for different instances on the same SAP system (with the same SAPSID) or for different SAP systems (with different SAPSIDs), perform either of the following tasks.

When registering multiple resources, ensure that all the parameters in the configuration file are set correctly for the resource. In particular, the setting of the SCALABLE parameter and the LH parameter depend on whether the resource is failover or scalable.

Examples of Configuring the SAP Web Application Server

The following examples show how the SAP Web Application Server can be configured to be highly available in Sun Cluster. The examples assume that the resource groups have been created, the resource groups are online, and the resource types have been registered.


Example 3 Configuring the SAP Central Services Components

In this example the SAP central services resource group is called centralrg, and the SAP replica server resource group is called replrg.

  1. To create an HAStoragePlus resource called hspcentralrs for the global device group enqdg in the resource group centralrg, the following command is run. The group centraldg is the global device group on which the SAP enqueue server is installed, and centralrg is the resource group to which the SAP enqueue server resource and the SAP message server resource belong.


    # scrgadm -a -j hspcentralrs  -g centralrg -t SUNW.HAStoragePlus \
    -x filesystemmountpoints="/global/sapdata" \
    -x globaldevicepaths=centraldg
    
  2. To enable the hspcentralrs resource, the following command is run.


    # scswitch -ej hspcentralrs
    
  3. To create an HAStoragePlus resource called hspreplrs for the global device group repldg in the resource group replrg, the following command is run. The group repldg is the global device group on which SAP replica server is installed, and replrg is the resource group to which the SAP replica server resource belongs.


    # scrgadm -a -j hspreplrs  -g replrg -t SUNW.HAStoragePlus \
    -x filesystemmountpoints="/global/sapdata" \
    -x globaldevicepaths=repldg
    
  4. To enable the hspreplrs resource, the following command is run.


    # scswitch -ej hspreplrs
    
  5. To create an SAP enqueue server resource called enqrs in the resource group centralrg, the following command is run. This resource is dependent on the hspcentralrs resource.


    # scrgadm -a -j enqrs  -g centralrg  -t SUNW.sapenq \
    -x Enqueue_Profile=/usr/sap/SC3/SYS/profile/SC3_ASCS07_central-lh \
    -x Enqueue_Server=/sapmnt/SC3/exe/enserver \
    -x SAP_User=sc3adm \
    -x Enqueue_Instance_Number=07 \
    -y Resource_Dependencies=hspcentralrs
    
  6. To enable the enqrs resource, the following command is run.


    # scswitch -ej enqrs
    
  7. To create an SAP replica server resource called replrs in the resource group replrg, the following command is run. This resource is dependent on the hspreplrs resource and the enqrs resource.


    # scrgadm -a -j replrs  -g replrg  -t SUNW.saprepl \
    -x Replica_Profile=/usr/sap/SC3/SYS/profile/SC3_REP07 \
    -x Replica_Server=/sapmnt/SC3/exe/enrepserver \
    -x SAP_User=sc3adm \
    -y Resource_Dependencies=hspreplrs,enqrs
    
  8. To create an SAP message server resource called msgrs in the resource group centralrg, the following command is run. This resource is dependent on the hspcentralrs resource. The SAP message server resource is an instance of the resource type that is named SUNW.sapscs.


    # scrgadm -a -j msgrs  -g centralrg  -t SUNW.sapscs \
    -x SAP_SID=SC3 \
    -x SAP_Instance_Number=07 \
    -x SAP_Instance_Name=ASCS07 \
    -x Msg_Server_Port=3607 \
    -x Scs_Startup_Script=/usr/sap/SC3/SYS/exe/run/my_startsap \
    -x Scs_Shutdown_Script=/usr/sap/SC3/SYS/exe/run/my_stopsap \
    -y Resource_Dependencies=hspcentralrs
    
  9. To enable the replrs resource and the msgrs resource, the following command is run.


    # scswitch -ej replrs,msgrs
    


Example 4 Configuring the SAP Web Application Server Component

In this example the resource group for the SAP web application server component is called webasrg.

  1. To create an HAStoragePlus resource called hspwebasrs for the global device group webasdg in the resource group webasrg, the following command is run. The group webasdg is the device group on which the SAP web application server component is installed, and webasrg is the resource group to which the SAP web application server resource belongs.


    # scrgadm -a -j hspwebasrs  -g webasrg -t SUNW.HAStoragePlus \ 
    -x filesystemmountpoints="/global/sapdata" \ 
    -x globaldevicepaths=webasdg
    
  2. To enable the haspwebasrs resource, the following command is run.


    # scswitch -ej hspwebasrs
    
  3. To create a resource called webasrs for the SAP web application server component, the following command is run. This resource is created in the failover resource group webasrg. This resource is dependent on the hspwebasrs resource. The webasrs resource is also dependent on the database resource dbwebasrs, which has already been created by the relevant data service. In addition, this resource is dependent on the SAP message server resource, which is called msgrs in the previous example.


    # scrgadm -a -j webasrs -g webasrg -t SUNW.sapwebas \ 
    -x SAP_SID=SC3 \
    -x SAP_Instance_Number=08 \
    -x SAP_Instance_Name=D08 \
    -y Resource_Dependencies=hspwebasrs,dbwebasrs,msgrs
    
  4. To enable the webasrs resource, the following command is run.


    # scswitch -ej webasrs
    

Using Alternate Project Identification

You can create a specific project, that is, an alternate project identification (ID), for the application. Set either RG_project_name or Resource_project_name or both, for the resource group and/or the resource, so that the application is started up under the specified project. Refer to the RGM doc for how to set these system properties.

See Cluster Administration and Application Development in Sun Cluster Concepts Guide for Solaris OS.

Tuning the Sun Cluster HA for SAP Web Application Server Fault Monitors

Fault monitoring for the Sun Cluster HA for SAP Web Application Server data service is provided by the following fault monitors:

Each fault monitor is contained in a resource whose resource type is shown in the following table.

Table 3 Resource Types for the Fault Monitors of Sun Cluster HA for SAP Web Application Server

Component 

Resource Type 

SAP enqueue server 

SUNW.sapenq

SAP replica server 

SUNW.saprepl

SAP message server 

SUNW.sapscs

SAP web application server component 

SUNW.sapwebas

SAP J2EE engine 

SUNW.gds

System properties and extension properties of the resource types control the behavior of the fault monitors. The default values of these properties determine the preset behavior of the fault monitors. The preset behavior should be suitable for most Sun Cluster installations. Therefore, you should tune the fault monitors only if you need to modify this preset behavior.

Tuning these fault monitors involves the following tasks:

Perform these tasks when you register and configure Sun Cluster HA for SAP Web Application Server, as described in Registering and Configuring Sun Cluster HA for SAP Web Application Server.

For detailed information about these tasks, see Tuning Fault Monitors for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Operation of the Fault Monitor for the SAP Enqueue Server Resource Type

To determine whether the SAP enqueue server and the SAP replica server are operating correctly, the fault monitor for the SAP enqueue server resource type probes these resources periodically.

The probe uses the SAP utility ensmon to check the health of the SAP enqueue server and the SAP replica server.


# ensmon -H localhost -S port   option
-H localhost

Specifies that the name of the host is localhost.

-S port

Specifies the enqueue port.

option

Specifies the resources that the probe should check. The possible values of this option are as follows:

  • 1 – Check the SAP enqueue server only.

  • 2 – Check both the SAP enqueue server and the SAP replica server.

If this command is run on the command line, a return code is returned on the command line.

During a probe, the fault monitor first determines whether both the SAP enqueue server and the SAP replica server are online by running the ensmon command with the option argument set to 2.


# ensmon -H localhost -S port   2

The result of this command determines the action of the probe, as follows:

  1. If the command times out, the SAP enqueue server fault monitor checks whether only the SAP enqueue server is online by running the ensmon command with the option set to 1.


    # ensmon -H localhost -S port   1
    
    • If this command times out, the SAP enqueue server issues a partial failure. If this timeout occurs one more time within the probe interval period, a failover occurs.

    • If this command succeeds, the SAP enqueue server fault monitor logs a warning message to explain that the SAP enqueue server is online but the status of the SAP replica server is unknown.

    • If this command causes a system error, the SAP enqueue server issues a less serious partial failure. If a system error occurs three more times within the probe interval period, a failover occurs.

    • For all other unsuccessful conditions, the SAP enqueue server triggers a failover.

  2. If the command does not time out, the probe checks the value of the return code from the ensmon command, as follows:

    • A return code value of 0 indicates that the command is successful, and no further action is taken until the next probe.

    • A return code value of 4 indicates that the enqueue is running, and the replica is configured, but the replica is not running. The probe logs a warning message to indicate that the replica is not running.

    • A return code value of 8 indicates that the enqueue server is not running, and the probe triggers a failover.

    • A return code of 12 indicates an invalid parameter for the command, and the probe triggers a failover.

    • All other return codes are treated as a partial failure. If such a failure occurs three more times within the probe interval period, a failover occurs.

Note that the values for the number of timeouts and the probe interval period are assigned by the SAP enqueue server fault monitor. You cannot change these values.

Operation of the Fault Monitor for the SAP Replica Server Resource Type

Fault monitor responsibility for the SAP replica server resource type is currently handled by the Process Monitor Facility (PMF) in Sun Cluster.

Operation of the Fault Monitor for the SAP Message Server Resource Type

The fault monitor probe for the SAP message server resource type requires the msprot program. See Configuration Requirements.

The msprot program is not configurable.

Operation of the Fault Monitor for the SAP Web Application Server Component Resource Type

The fault monitoring for the SAP message server component resource type is performed by the dpmon program.

The dpmon program is not configurable.

Operation of the Fault Monitor for the SAP J2EE Engine Resource Type

The fault monitor probe for the SAP J2EE engine resource type requires the sap_j2ee_probe program.

The sap_j2ee_probe program is not configurable.

Verifying the Sun Cluster HA for SAP Web Application Server Installation and Configuration

You have installed, registered, and configured the data service for SAP Web Application Server. Now verify that the data service makes the SAP Web Application Server highly available by performing the following tasks.

See Tuning the Sun Cluster HA for SAP Web Application Server Fault Monitors for a description of the fault monitors.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Enqueue Server

Perform this procedure on each set of two nodes where the SAP enqueue server and the SAP replica server can run.

Steps
  1. Log in to a node as superuser.

  2. Ensure that the SAP replica server resource group is offline on all nodes.

    At this point in this procedure you are testing the behavior of the SAP enqueue server resource group without the SAP replica server resource group. Therefore, the SAP replica server resource group must be offline on all nodes. Further in this procedure you will test the behavior of the SAP enqueue server with the SAP replica server resource group.

  3. Bring online the resource group to which the SAP enqueue server belongs.


    # scswitch -z  -g central-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP enqueue server belongs.

    -h node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

  4. Abnormally terminate the SAP enqueue server.

    1. Determine the process ID of the SAP enqueue server, where the name of the SAP enqueue server executable file is enserver.


      # ps -ef | grep enserver
      
    2. Kill the process for the SAP enqueue server.


      # kill -9 pid
      
      pid

      Specifies the process ID of the SAP enqueue server. This ID is the process ID that you determined with the ps and grep commands.

  5. Confirm that the SAP enqueue server fails over to another node.

    Run the scstat command to confirm that the SAP enqueue server resource is offline on the first node and online on the second node.

  6. Again, bring online the resource group to which the SAP enqueue server belongs.


    # scswitch -z  -g central-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP enqueue server belongs.

    -h node

    Specifies the name of the node on which the resource group is to be brought online.

  7. Log in to a different node as superuser. On this node, bring online the resource group to which the SAP replica server belongs.


    # scswitch -z  -g repl-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g repl-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP replica server belongs.

    -h node

    Specifies the name of the node on which resource group is to be brought online. This node is the node that you have just logged in to.

  8. Again, abnormally terminate the SAP enqueue server, as in Step 4.

  9. Confirm that the SAP enqueue server resource group fails over to the node on which the SAP replica server resource group is running.

    As the SAP enqueue server resource group starts on the node on which the SAP replica server resource group is running, the SAP replica server resource group fails over to another available node. If no node is available, the SAP replica server resource group is offline.

    Run the scstat command to confirm that the SAP enqueue server resource group is offline on the first node and online on the second node. Confirm also that the SAP replica server resource group is offline on the second node. The SAP replica server resource group can be either online on another available node or offline.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Replica Server

Perform this procedure on each set of two nodes where the SAP replica server and the SAP enqueue server can run.

Steps
  1. Log in to a node as superuser.

  2. Bring online the resource group to which the SAP enqueue server belongs.

    The SAP replica server resource is configured to be dependent on the SAP enqueue server resource.


    # scswitch -z  -g central-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP enqueue server belongs.

    -h node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

  3. Log in to a different node as superuser.

  4. Bring online the resource group to which the SAP replica server belongs.


    # scswitch -z  -g repl-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g repl-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP replica server belongs.

    -h node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

  5. Abnormally terminate the SAP replica server.

    1. Determine the process ID of the SAP replica server, where the name of the SAP replica server executable file is enrepserver.


      # ps -ef | grep enrepserver
      
    2. Kill the process for the SAP replica server.


      # kill -9 pid
      
      pid

      Specifies the process ID of the SAP replica server. This ID is the process ID that you determined with the ps and grep commands.

  6. Confirm that the SAP replica server either restarts or fails over.

    If the abnormal termination action in Step 5 is repeated a specified number of times within a specified time interval, the SAP replica server fails over to an available node that is not running the SAP enqueue server. If no node is available, the SAP replica server is offline.

    If the abnormal termination action is not repeated a specified number of times within a specified time interval, the SAP replica server restarts on the same node.

    Run the scstat command to determine the status of the SAP replica server.

    The maximum number of times that the application can be abnormally terminated before failing over is specified with the standard property Retry_count. The time interval is specified with the standard property Retry_interval. These properties are described in Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Message Server

Perform this procedure on each node where the SAP message server can run.

Steps
  1. Log in to a node as superuser.

  2. Bring online the resource group to which the SAP message server belongs.


    # scswitch -z  -g central-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP message server belongs.

    -h node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

  3. Specify that failover is to be enabled for the resource group.


    # scrgadm -c  -g central-rg -y Failover_Enabled=True
    
    -c

    Specifies that an existing configuration is to be modified

    -g central-rg

    Specifies the name of the resource group to be modified

    -y Failover_Enabled=True

    Specifies that the resource group is to fail over when Retry_count is exceeded during Retry_interval

  4. Terminate the SAP message server.

  5. Confirm that the SAP message server either restarts or fails over.

    If the abnormal termination action in Step 4 is repeated a specified number of times within a specified time interval, the SAP message server fails over to an available node. If no node is available, the SAP message server is offline.

    If the abnormal termination action is not repeated a specified number of times within a specified time interval, the SAP message server restarts on the same node.

    Run the scstat command to determine the status of the SAP message server.

    Note that the maximum number of times that the application can be abnormally terminated before failing over is specified with the standard property Retry_count, and the time interval is specified with the standard property Retry_interval. These properties are described in Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

  6. Again, bring online the resource group to which the SAP message server belongs, as described in Step 2.

  7. Specify that failover is to be disabled for the resource group.


    # scrgadm -c  -g central-rg -y Failover_Enabled=False
    
    -c

    Specifies that an existing configuration is to be modified

    -g central-rg

    Specifies the name of the resource group to be modified

    -y Failover_Enabled=False

    Specifies that the resource group is not to fail over when Retry_count is exceeded during Retry_interval

  8. Terminate the SAP message server.

  9. Confirm that the SAP message server restarts.

    Because the Failover_Enabled is set to False, the SAP message server always restarts.

ProcedureHow to Verify the Operation of the Fault Monitor for the SAP Web Application Server Component

Perform this procedure on each node where the SAP web application server component can run.

Steps
  1. Log in to a node as superuser.

  2. Bring online the resource group to which the SAP message server belongs.

    The SAP web application server component resource is configured to be dependent on the SAP message server resource.


    # scswitch -z  -g central-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP message server belongs.

    -h node

    Specifies the name of the node on which resource group is to be brought online. This node is the node that you have just logged in to.

  3. Bring online the resource group to which the SAP web application server component belongs.


    # scswitch -z  -g webas-rg -h node
    
    -z

    Specifies that a resource group is to be brought online.

    -g webas-rg

    Specifies the name of the resource group to be brought online. This group is the resource group to which the SAP web application server component belongs.

    -h node

    Specifies the name of the node on which the resource group is to be brought online. This node is the node that you have just logged in to.

  4. Terminate the SAP web application server component.

  5. Confirm that the SAP web application server component is restarted locally.

    If the abnormal termination action in Step 4 is repeated a specified number of times within a specified time interval, the resulting behavior depends on whether the SAP web application server component resource was configured as a failover or a scalable resource.

    • If the SAP web application server component resource was configured as a failover resource, the resource fails over to an available node. If no node is available, the SAP web application server component is offline.

    • If the SAP web application server component resource was configured as a scalable resource, the resource is offline on this node.

    Run the scstat command to determine the status of the SAP web application server component.

    Note that the maximum number of times that the application can be abnormally terminated before failing over or becoming offline is specified with the standard property Retry_count, and the time interval is specified with the standard property Retry_interval. These properties are described in Resource Properties in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

ProcedureHow to Verify the Installation and Configuration of Sun Cluster HA for SAP J2EE Engine

Steps
  1. Become superuser on one of the nodes in the cluster that is to host the SAP J2EE engine.

  2. Run the scstat command to ensure all the resources are online.


    # scstat 
    

    For each SAP J2EE engine resource that is not online, run the scswitch command as follows.


    # scswitch -e -j j2ee-rs
    
    -e

    Specifies that a resource is to be enabled

    -j j2ee-rg

    Specifies the name of the resource that is to be enabled

  3. Run the scswitch command to switch the SAP J2EE engine resource group to another cluster node, such as node2.


    # scswitch -z -g j2ee-rg -h node2
    
    -z

    Specifies that a resource group is to be brought online

    -g j2ee-rg

    Specifies the name of the resource group to be brought online

    -h node2

    Specifies the name of the node on which the resource group is to be brought online

Debugging Sun Cluster HA for SAP J2EE Engine

Sun Cluster HA for SAP J2EE Engine can be used by multiple Sun Cluster instances. However, it is possible to activate debugging for all Sun Cluster instances or for a particular Sun Cluster instance.

Each Sun Cluster component has a DEBUG file in /opt/SUNWscswa/etc.

This file allows you to activate debugging for all Sun Cluster resources or for a specific Sun Cluster resource on a particular node with Sun Cluster. If you require debugging to be turned on for Sun Cluster HA for SAP J2EE Engine across the entire Sun Cluster, repeat these steps on all nodes within Sun Cluster.

ProcedureHow to Activate Debugging for Sun Cluster HA for SAP J2EE Engine

Steps
  1. Edit the file /etc/syslog.conf.

    In the file /etc/syslog.conf, change daemon.notice to daemon.debug.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                     operator

    Change daemon.notice to daemon.debug and restart syslogd. The command grep daemon /etc/syslog.conf issues the following output, which shows that daemon.debug has now been set.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.debug;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                    operator
    #
    # pkill -1 syslogd
    
  2. Edit the file /opt/SUNWscswa/etc/config.

    In the file /opt/SUNWscswa/etc/config, change DEBUG= to DEBUG=ALL or DEBUG=resource.


    # cat /opt/SUNWscswa/etc/config
    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # Usage:
    #       DEBUG=<RESOURCE_NAME> or ALL
    #
    DEBUG=ALL
    #
Deactivating Debugging

To deactivate debugging, perform the steps in this procedure in the reverse order.