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

How to Install and Configure the SAP J2EE Engine

  1. On one node of the cluster, install the SAP J2EE engine software.

    Refer to the SAP installation documentation.

  2. 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.


  3. Modify the script that returns logical host names for the SAP message server and the SAP J2EE engine.

    Modify the script named loghost, which returns the logical host names for each instance of both the SAP message server and the SAP J2EE engine. The script must be located in the directory $HOME, where $HOME specifies the home directory of the SAP user.


    Example 1–6 Modifying the Script to Return Logical Host Names


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

  4. Set the file permissions for the script so that it is executable.


    # chmod 755 $HOME/loghost
  5. 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 3. This action is accomplished by replacing the line HOSTNAME='hostname' with the lines in the following example.


      Example 1–7 Changing the SAP Start and Stop Scripts to Call the Script to Return Logical Host Names


      < 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.

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

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

    1. Remove the physical host name from the names of the “.” files in the home directory of the SAP user.

      In the following example, physical-hostname represents the physical host name.


      Example 1–8 Removing the Physical Host Name From File Names


      # for i in .*physical-hostname.*
        > do
        > mv $i `echo $i | sed "s/_physical-hostname//"`
        > done

    2. Change the database “.” files to refer to logical host names instead of physical host names.

    3. Change the file names and contents of the profile files to use logical host names 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 the logical-host-name file SAPSID_INSTANCE_NAMESYSTEM_NUMBER_logical-hostname 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.

  7. Use the SAP configuration tool to modify the SAP J2EE engine settings to reference the logical host name.

    To start the SAP configuration tool, you can use the script offlinecfgeditor.sh, which is located in the directory /usr/sap/SAPSID/JCINSTANCE_NUMBER/j2ee/configtool.

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

    2. In the LockingManager section, modify all occurrences of enq.profile.filename to use the logical host name. 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.

    3. In the ClusterManager section, change ms.host to refer to the logical host name for the SAP message server.

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