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

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.