Sun Cluster Data Service for SAP Guide for Solaris OS

Installing and Configuring Sun Cluster HA for SAP

This chapter contains the procedures on how to install and configure Sun Cluster HA for SAP.

This chapter contains the following procedures.

Sun Cluster HA for SAP Overview

Use the information in this section to understand how Sun Cluster HA for SAP makes SAP highly available.

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

Sun Cluster HA for SAP provides fault monitoring and automatic failover for the SAP application to eliminate single points of failure in an SAP system. The following table lists the data services that best protect SAP components in a Sun Cluster configuration. You can configure Sun Cluster HA for SAP as a failover application or a scalable application.

Table 1–1 Protection of SAP Components

SAP Component 

Protected by 

SAP database 

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

  • For the SAP DB database, the data service is Sun Cluster HA for SAP DB.

  • For the Oracle database, the data service is Sun Cluster HA for Oracle.

SAP central instance 

Sun Cluster HA for SAP 

The resource type is SUNW.sap_ci or SUNW.sap_ci_v2.

SAP application server 

Sun Cluster HA for SAP 

The resource type is SUNW.sap_as or SUNW.sap_as_v2.

NFS file system 

Sun Cluster HA for NFS 

Sun Cluster HA for SAP requires a functioning cluster with the initial cluster framework already installed. See the Sun Cluster Software Installation Guide for Solaris OS for details on initial installation of clusters and data service software. Register Sun Cluster HA for SAP after you successfully install the basic components of the Sun Cluster and SAP software.

Installing and Configuring Sun Cluster HA for SAP

Table 1–2 lists the tasks for installing and configuring Sun Cluster HA for SAP. Perform these tasks in the order that they are listed.

Table 1–2 Task Map: Installing and Configuring Sun Cluster HA for SAP

Task 

For Instructions, Go To 

Plan the SAP installation 

Planning the Sun Cluster HA for SAP Installation and Configuration

Upgrade Sun Cluster HA for SAP 

How to Upgrade a Resource Type or Convert a Failover Application Resource to a Scalable Application Resource

Prepare the nodes and disks 

How to Prepare the Nodes

Install SAP and the database 

How to Install SAP and the Database

Install the SAP application server 

If you plan to install the SAP application server as a failover service, go to How to Enable Failover SAP Instances to Run in a Cluster

If you plan to install the SAP application server as a scalable service, go to How to Install and Enable an SAP Scalable Application Server

Configure your highly available database 

Configuring Your Highly Available Database

Verify the SAP installation 

If you plan to install a failover SAP application server, go to the following sections: 

If you plan to install a scalable SAP application server, go to Verifying an SAP Scalable Application Server.

Install Sun Cluster HA for SAP packages 

Installing the Sun Cluster HA for SAP Packages

Register and configure Sun Cluster HA for SAP  

If you plan to configure Sun Cluster HA for SAP as a failover data service, go to: 

If you plan to configure Sun Cluster HA for SAP as a scalable data service, go to: 

Set up a lock file 

Setting Up a Lock File

Verify Sun Cluster HA for SAP installation and configuration 

If you plan to configure Sun Cluster HA for SAP as a failover data service, go to: 

If you plan to configure Sun Cluster HA for SAP as a scalable data service, go to How to Verify Sun Cluster HA for SAP Installation and Configuration of as a Scalable Data Service.

Understand Sun Cluster HA for SAP fault monitor 

Understanding Sun Cluster HA for SAP Fault Monitor

Planning the Sun Cluster HA for SAP Installation and Configuration

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

Configuration Restrictions


Caution – Caution –

Your data service configuration might not be supported if you do not observe these restrictions.


Use the restrictions in this section to plan the installation and configuration of Sun Cluster HA for SAP. This section provides a list of software and hardware configuration restrictions that apply to Sun Cluster HA for SAP.

For restrictions that apply to all data services, see the release notes for your release of Sun Cluster.

Configuration Requirements


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


Use the requirements in this section to plan the installation and configuration of Sun Cluster HA for SAP. These requirements apply to Sun Cluster HA for SAP only. You must meet these requirements before you proceed with your Sun Cluster HA for SAP installation and configuration.

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

Standard Data Service Configurations

Use the standard configurations in this section to plan the installation and configuration of Sun Cluster HA for SAP. Sun Cluster HA for SAP supports the standard configurations in this section. Sun Cluster HA for SAP might support additional configurations. However, you must contact your Enterprise Services representative for information on additional configurations.

Figure 1–1 Four-Node Cluster with Central Instance, Application Servers, and Database

Illustration: The graphic's title describes the graphic.

Figure 1–2 Two-Node Cluster with Central Instance, NFS, Database, and Non-HA External Application

Illustration: The graphic's title describes the graphic.


Note –

The configuration in Figure 1–2 was a common configuration under previous Sun Cluster releases. To use the Sun Cluster software to the fullest extent, configure SAP as shown in Figure 1–1 or Figure 1–3.


Figure 1–3 Two-Node Cluster With Central Instance, Database, and Development Node

Illustration: The graphic's title describes the graphic.

Configuration Considerations

Use the information in this section to plan the installation and configuration of Sun Cluster HA for SAP. The information in this section encourages you to think about the impact your decisions have on the installation and configuration of Sun Cluster HA for SAP.

Failover and Scalable Applications

Scalable Applications

Configuration Planning Questions

Use the questions in this section to plan the installation and configuration of Sun Cluster HA for SAP. Insert the answers to these questions into the data service worksheets in “Configuration Worksheets” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. See Configuration Considerations for information that might apply to these questions.

Packages and Support

Table 1–3 and Table 1–4 list the packages that Sun Cluster HA for SAP supports.

Table 1–3 Sun Cluster HA for SAP Packages From Sun Cluster 3.0 7/01

Resource Type 

Description 

SUNW.sap_ci

Added support for failover central instance. 

SUNW.sap_as

Added support for failover application servers. 

The *_v2 resource types are the latest version of the resource types (RT) for Sun Cluster HA for SAP. The *_v2 resource types are a superset of the original RTs. Whenever possible, use the latest RTs provided.

Table 1–4 Sun Cluster HA for SAP Package From Sun Cluster 3.0 12/01

Resource Type 

Description 

SUNW.sap_ci

Same as Sun Cluster 3.0 7/01. See Table 1–3.

SUNW.sap_as

Same as Sun Cluster 3.0 7/01. See Table 1–3.

SUNW.sap_ci_v2

Added the Network_resources_used resource property to the Resource Type Registration (RTR) file.

 

Retained support for failover central instance. 

SUNW.sap_as_v2

Added the Network_resources_used resource property to RTR file.

Added support for scalable application servers. 

 

Retained support for failover application servers 

Upgrading Sun Cluster HA for SAP

As Table 1–3 and Table 1–4 illustrate, the Sun Cluster HA for SAP package from Sun Cluster 3.0 7/01 does not support a scalable application server and the Network_resources_used resource property. Therefore, you have the following upgrade options.

How to Upgrade a Resource Type or Convert a Failover Application Resource to a Scalable Application Resource

Use this procedure to upgrade a resource type or to convert a failover application server resource to a scalable application server resource. This procedure requires that you schedule down time.

  1. Disable the existing resource.

  2. Delete the existing resource from the resource group.

  3. Delete the existing resource type if no other resource uses it.

  4. Register the new resource type.

  5. Which task are you performing?

    • If you are upgrading the resource type for the central instance, skip to Step 7.

    • If you are converting a failover application server resource to a scalable application server resource, proceed to Step 6.

  6. Create the new application server resource group.

  7. Add the scalable application resource to the resource group.

Where to Go From Here

Go to How to Prepare the Nodes.

Preparing the Nodes and Disks

This section contains the procedures you need to prepare the nodes and disks.

How to Prepare the Nodes

Use this procedure to prepare for the installation and configuration of SAP.

  1. Become superuser on all of the nodes.

  2. Configure the /etc/nsswitch.conf so that Sun Cluster HA for SAP starts and stops correctly in the event of a switchover or a failover.

    On each node that can master the logical host that runs Sun Cluster HA for SAP, include one of the following entries for group in the /etc/nsswitch.conf file.


    group:
    group: files [NOTFOUND=return] nis
    group: file [NOTFOUND=return] nisplus
    

    Sun Cluster HA for SAP uses the su user command to start and probe SAP. The network information name service might become unavailable when a cluster node's public network fails. When you add one of the entries for group in the /etc/nsswitch.conf file, you ensure that the su(1M) command does not refer to the NIS/NIS+ name services if the network information name service is unavailable.

Where to Go From Here

Go to How to Register and Configure Sun Cluster HA for SAP as a Scalable Data Service.

Installing and Configuring SAP and Database

This section contains the procedures you need to install and configure SAP and the database.

How to Install SAP and the Database

Use this procedure to install SAP and the database.

  1. Become superuser on one of the nodes in the cluster where you are installing the central instance.

  2. Install SAP binaries on a cluster file system.


    Note –

    Before you install SAP software on a cluster file system, use the scstat(1M) command to verify that the Sun Cluster software is fully operational.


    1. For all of the SAP-required kernel parameter changes, edit the /etc/system file on all of the cluster nodes that will run the SAP application.

      After you edit the /etc/system file, reboot each node. See the SAP document R/3 Installation on UNIX-OS Dependencies for details on kernel parameter changes.

    2. See the SAP document Installation of the SAP R/3 on UNIX for details on how to install the central instance, the database, and the application server instances.

      See How to Install and Enable an SAP Scalable Application Server for the procedure on how to install a scalable application server in a Sun Cluster environment.

Where to Go From Here

Go to How to Enable Failover SAP Instances to Run in a Cluster or How to Install and Enable an SAP Scalable Application Server.

How to Install and Enable an SAP Scalable Application Server

Use this procedure to install scalable application server instances. This procedure assumes that you installed the central instance and the database. This procedure includes additional steps for SAP 6.10 and SAP 6.20 users to ensure that Sun Cluster HA for SAP can manage and bring online SAP 6.10 and SAP 6.20 services. SAP 6.10 and SAP 6.20 create one startsap script and one stopsap script. Other SAP versions create one of each of theses scripts for each service you create. This difference accounts for the additional steps for SAP 6.10 and SAP 6.20 users.

To configure a J2EE engine cluster with your Sun Cluster HA for SAP, after you complete this procedure, complete the additional steps in How to Configure an SAP J2EE Engine Cluster with your Sun Cluster HA for SAP with an Application Server.

To configure an SAP Web dispatcher with your Sun Cluster HA for SAP agent, after you complete this procedure, complete the additional steps in How to Configure an SAP Web Dispatcher With Your Sun Cluster HA for SAP.


Tip –

The following file system layout ensures ease of use and prevents data from being overwritten.


  1. Create all SAP directories on cluster file systems.

    • Ensure that the central instance and the database can fail over.

    • Set up the lock file on cluster file system for the central instance to prevent a multiple startup from a different node.

      For the procedure on how to set up a lock file on the central instance, see How to Set Up a Lock File for Central Instance or the Failover Application Server.

    • Ensure that all application servers can use the SAP binaries on a cluster file system.

  2. Install the central instance and the database on a cluster file system.

    See the SAP document Installation of the SAP R/3 on UNIX for details on how to install the central instance and the database.

  3. On all nodes that will host the scalable application server, create a local directory for the data/log/sec/work directories and the log files for starting and stopping the application server.

    Create a local directory for each new application server.

    Example:


    # mkdir -p /usr/sap/local/SID/D03
    

    Caution – Caution –

    You must perform this step. If you do not perform this step, you will inadvertently install a different application server instance on a cluster file system and the two application servers will overwrite each other.


  4. Set up a link to point to the local application server directory from a cluster file system, so the application server and the startup log file and the stop log file will be installed on the local file system.

    Example:


    # ln -s /usr/sap/local/SID/D03 /usr/sap/SID/D03
    
  5. Install the application server.

  6. Are you using SAP 6.10 or SAP 6.20?

  7. Become user sapsidadm.

  8. Make a copy of the startsap script and the stopsap script, and save these files in the SAPSIDadm home directory. The filenames that you choose specify this instance.


    # cp /usr/sap/SID/SYS/exe/run/startsap \
    $SAPSID_HOME/startsap_instance-number
    
    # cp /usr/sap/SID/SYS/exe/run/stopsap \
    $SAPSID_HOME/stopsap_instance-number
    
  9. Make backup copies of the following files because you will modify them. In the SAP profile directory, modify all the filenames for this instance. The filenames that you choose must be specific to this instance, and they must follow the same naming convention you chose in Step 8.


    # mv SAPSID_Service-StringSystem-Number_physical-hostname \
    SAPSID_Service-StringSystem_instance-number
    
    # mv START_Service-StringSystem-Number_physical-hostname \
    START_Service-StringSystem_instance-number
    
  10. Modify the contents of the files you created in Step 9 to replace any reference to the physical host with the instance number.


    Caution – Caution –

    It is important that you make your updates consistent so that you can start and stop this application server instance from all the nodes that will run this scalable application server. For example, if you make these changes for SAP instance number 02, then use 02 where this instance number appears. If you do not use a consistent naming convention you will be unable start and stop this application server instance from all the nodes that will run this scalable application server.


  11. Edit the start script and the stop script so that the startup log file and the stop log file will be node specific under the home directories of users sapsidadm and orasapsid.

    Example:


    # vi startsap_D03
    

    Before:


    LOGFILE=$R3S_LOGDIR/`basename $0.log`

    After:


    LOGFILE=$R3S_LOGDIR/`basename $0`_`uname -n`.log
  12. Copy the application server (with the same SAPSID and the same instance number) on all nodes that run the scalable application server.

    The nodes that run the scalable application server are in the scalable application server resource group nodelist.

  13. Ensure that you can startup and stop the application server from each node, and verify that the log files are in the correct location.

  14. Create the SAP logon group if you use a logon group.

Where to Go From Here

To configure a J2EE engine cluster with your Sun Cluster HA for SAP, go to How to Configure an SAP J2EE Engine Cluster with your Sun Cluster HA for SAP with an Application Server.

To configure an SAP Web dispatcher with your Sun Cluster HA for SAP agent, go to How to Configure an SAP Web Dispatcher With Your Sun Cluster HA for SAP.

If you are not using a J2EE engine cluster or an SAP Web dispatcher with your Sun Cluster HA for SAP, go to Configuring Your Highly Available Database.

How to Enable Failover SAP Instances to Run in a Cluster

During SAP installation, the SAP software creates files and shell scripts on the server on which you installed the SAP instance. These files and scripts use physical server names. To run the SAP software with Sun Cluster software, replace references to a physical server with references to a network resource (logical hostname). Use this procedure to enable SAP to run in a cluster.

To configure a J2EE engine cluster with your Sun Cluster HA for SAP with a Central Instance, after you complete this procedure, complete the additional steps in How to Configure an SAP J2EE Engine with your Sun Cluster HA for SAP with Central Instance.

To configure a J2EE engine cluster with your Sun Cluster HA for SAP with an SAP Application Server, go to How to Configure an SAP J2EE Engine Cluster with your Sun Cluster HA for SAP with an Application Server.

To configure SAP Web dispatcher with your Sun Cluster HA for SAP agent, after you complete this procedure, complete the additional steps in How to Configure an SAP Web Dispatcher With Your Sun Cluster HA for SAP.

  1. Make backup copies of the files you will modify in Step 5 through Step 8.

  2. Log in to the node on which you installed the SAP software.

  3. Shut down the SAP instances (central instance and application server instances) and the database.

  4. Are you using SAP 6.10 or SAP 6.20?

  5. Make a copy of the startsap script and the stopsap script, and save these files in the SAPSIDadm home directory. The filenames that you choose must specify this instance.


    # cp /usr/sap/SID/SYS/exe/run/startsap  \
    $SAPSID_HOME/startsap_logical-hostname_instance-number
    # cp /usr/sap/SID/SYS/exe/run/startsap \
    $SAPSID_HOME/stopsap_logical-hostname_instance-number
    
  6. Become user sapsidadm, and then perform the following tasks.

    • In the SAPSIDadm home directory, modify all of the file names that reference a physical server name.

    • In the SAPSIDadm home directory, modify all of the file contents—except log file contents—that reference a physical server name.

    • In the SAP profile directory, modify all of the file names that reference a physical server name.

  7. As user sapsidadm, add entries for the parameter SAPLOCALHOST.

    Add this entry to the SAPSID_Service-StringSystem-Number_logical-hostname profile file under the /sapmnt/SAPSID/profile directory.

    For Central Instance:


    SAPLOCALHOST=ci-logical-hostname
    

    This entry enables the external application server to locate the central instance by using the network resource (logical hostname).

    For Application Server:


    SAPLOCALHOST=as-logical-hostname
    
  8. Become user orasapsid, and then perform the following tasks.

    • In the oraSAPSID home directory, modify all of the file names that reference a physical server name.

    • In the oraSAPSID home directory, modify all of the file contents—except log file contents—that reference a physical server name.

  9. Ensure that the /usr/sap/tmp directory owned by user sapsidadm and group sapsys exists on all nodes that can master the failover SAP instance.

Where to Go From Here

To configure a J2EE engine cluster with your Sun Cluster HA for SAP with a Central Instance, go to How to Configure an SAP J2EE Engine with your Sun Cluster HA for SAP with Central Instance.

To configure a J2EE engine cluster with your Sun Cluster HA for SAP with an SAP Application Server, go to How to Configure an SAP J2EE Engine Cluster with your Sun Cluster HA for SAP with an Application Server.

To configure an SAP Web dispatcher with your Sun Cluster HA for SAP agent, go to How to Configure an SAP Web Dispatcher With Your Sun Cluster HA for SAP.

If you are not using a J2EE engine cluster or an SAP Web dispatcher with your Sun Cluster HA for SAP agent, go to Configuring Your Highly Available Database.

How to Configure an SAP J2EE Engine Cluster with your Sun Cluster HA for SAP with an Application Server

After you have completed How to Install and Enable an SAP Scalable Application Server, perform the following steps.


Note –

The SAP J2EE engine is started by the SAP dispatcher which is under the protection of the Sun Cluster HA for SAP. If the SAP J2EE engine goes down, the SAP dispatcher will restart it.


  1. Using the SAP J2EE Admintool GUI, change ClusterHosts parameter to list the logical host for the central instance and port pair under the dispatcher/Manager/ClusterManager.


    logical-host-ci:port
  2. Change the file j2ee-install-dir/additionalproperties as follows:


    com.sap.instanceId = logical-host-as_SID_SYSNR
    
  3. Change the file j2ee-install-dir/server/services/security/work/R3Security.properties as follows:


    sapbasis.ashost = logical-host-as
    

Where to Go From Here

Go to Configuring Your Highly Available Database

How to Configure an SAP J2EE Engine with your Sun Cluster HA for SAP with Central Instance

After you have completed How to Enable Failover SAP Instances to Run in a Cluster or How to Enable Failover SAP Instances to Run in a Cluster, perform the following steps.


Note –

The SAP J2EE engine is started by the SAP dispatcher which is under the protection of the Sun Cluster HA for SAP. If the SAP J2EE engine goes down, the SAP dispatcher will restart it.


  1. Using the SAP J2EE Admintool GUI, change the ClusterHosts parameter to list all logical hosts for the application server and port pair under dispatcher/Manager/ClusterManager. For example,


    as1–1h:port;as2–1h:port ...
    

  2. Change the file j2ee-install-dir/additionalproperties as follows:


    com.sap.instanceId = logical-host-ci_SID_SYSNR
    
  3. Change the file j2ee-install-dir/server/services/security/work/R3Security.properties as follows:


    sapbasis.ashost = logical-host-ci
    
  4. Change the file SDM-dir/program/config/flow.xml


    host = logical-host-ci
    

Where to Go From Here

Go to Configuring Your Highly Available Database

How to Configure an SAP Web Dispatcher With Your Sun Cluster HA for SAP

After you have configured the SAP Web dispatcher with your Sun Cluster HA for SAP, perform the following steps.


Note –

The SAP Web dispatcher has the capability of auto restart. If the SAP Web dispatcher goes down, the SAP Web dispatcher watch dog process will restart. Currently, there is no Sun Cluster agent available for the SAP Web dispatcher.


  1. Ensure that SAP Web dispatcher has an instance number different than the Central Instance and the application server instances.

    For example, SAPSYSTEM = 66 is used in the profile for the SAP Web dispatcher.

  2. Activate the Internet Communication Frame Services manually after you install the SAP Web Application Server.

    See SAP OSS note 517484 for more details.

Where to Go From Here

Go to Configuring Your Highly Available Database.

Configuring Your Highly Available Database

SAP supports various databases. See the appropriate Sun Cluster data services book for details on how to configure the resource type, resource group, and resource for your highly available database. For example, see the following documentation for more information:

Additionally, see the appropriate Sun Cluster data services book and the appropriate chapter of your database installation book for details on other resource types to configure with your database. The Sun Cluster data services books include details on how to configure other resource types for databases. For example, if you plan to use the SAP DB database or the Oracle database, set up the SUNW.HAStoragePlus resource type. For more information, see the following sections:

Where to Go From Here

Go to How to Verify SAP and the Database Installation with Central Instance or Verifying an SAP Scalable Application Server.

Verifying the SAP Installation

This section contains the procedures you need to verify the SAP installation.

How to Verify SAP and the Database Installation with Central Instance

Use this procedure to verify SAP central instance. Perform the following steps on all of the potential nodes on which the central instance can run.

  1. Create the failover resource group to hold the network and central instance resources.


    # scrgadm -a -g sap-ci-resource-group [-h nodelist]

    Note –

    Use the -h option to the scrgadm(1M) command to select the set of nodes on which the SAP central instance can run.


  2. Verify that you have added to your name service database all of the network resources that you use.

  3. Add a network resource (logical hostname) to the failover resource group.


    # scrgadm -a -L -g sap-ci-resource-group
     -l ci-logical-hostname [-n netiflist]
  4. Enable the resource group.

    Run the scswitch(1M) command to move the resource group into a managed state and bring the resource group online.


    # scswitch -Z -g sap-ci-resource-group
    
  5. Log in to the cluster member that hosts the central instance resource group.

  6. Ensure that the database is running.

  7. Manually start the central instance.

  8. Start the SAP GUI using the logical hostname, and verify that SAP initializes correctly.

    The default dispatcher port is 3200.

  9. Manually stop the central instance.

  10. Switch this resource group to another cluster member that can host the central instance.


    # scswitch -z -h node -g sap-ci-resource-group
    
  11. Repeat Step 5 through Step 9 until you verify startup and shutdown of the central instance on each cluster node that can host the central instance.

Where to Go From Here

Go to How to Verify an SAP Failover Application Server.

How to Verify an SAP Failover Application Server

Use this procedure to verify SAP and the database installation for the failover application server. Perform the following steps on all of the potential nodes on which the failover application server can run.

  1. Create the failover resource group to hold the network and application server resources.


    # scrgadm -a -g sap-as-fo-resource-group
    

    Note –

    Use the -h option to the scrgadm command to select the set of nodes on which the SAP application server can run.


    # scrgadm -a -g sap-as-fo-resource-group\
     [-h nodelist]


  2. Verify that you added to your name service database all of the network resources that you use.

  3. Add a network resource (logical hostname) to the failover resource group.


    # scrgadm -a -L -g sap-as-fo-resource-group\
     -l as-fo-logical-hostname [-n netiflist]
  4. Enable the resource group.

    Run the scswitch(1M) command to move the resource group into a managed state and bring the resource group online.


    # scswitch -Z -g sap-as-of-resource-group
    
  5. Log in to the cluster member that hosts the application server resource group.

  6. Manually start the application server.

  7. Start the SAP GUI using the logical hostname, and verify that SAP initializes correctly.

  8. Manually stop the application server.

  9. Switch this resource group to another cluster member that can host the application server.


    # scswitch -z -h node -g sap-as-fo-resource-group
    
  10. Repeat Step 5 through Step 7 until you verify startup and shutdown of the application server on each cluster node that can host the application server.

Where to Go From Here

Go to Installing the Sun Cluster HA for SAP Packages.

Verifying an SAP Scalable Application Server

If you installed scalable application server instances in How to Install and Enable an SAP Scalable Application Server, you verified the installation of an SAP scalable application server in Step 13 of How to Install and Enable an SAP Scalable Application Server.

Where to Go From Here

Go to Installing the Sun Cluster HA for SAP Packages.

Installing the Sun Cluster HA for SAP Packages

If you did not install the Sun Cluster HA for SAP 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 packages. To complete this procedure, you need the Sun Java Enterprise System Accessory CD Volume 3.

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 packages by using one of the following installation tools:


Note –

The Web Start program is not available in releases earlier than Sun Cluster 3.1 Data Services 10/03.


How to Install the Sun Cluster HA for SAP 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.

  1. On the cluster node where you are installing the Sun Cluster HA for SAP 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. Load the Sun Java Enterprise System Accessory CD Volume 3 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 component directory of the CD-ROM.

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


    # cd /cdrom/cdrom0/\
    components/SunCluster_HA_SAP_3.1/
    
  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 instructions on the screen to install the Sun Cluster HA for SAP 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. Unload the Sun Java Enterprise System Accessory CD Volume 3 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
      

Where to Go From Here

Go to Registering and Configuring Sun Cluster HA for SAP.

How to Install the Sun Cluster HA for SAP Packages by Using the scinstall Utility

  1. Load the Sun Java Enterprise System Accessory CD Volume 3 into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

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

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Java Enterprise System Accessory CD Volume 3.

    The utility refers to the CD-ROM 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-ROM from the drive.

Where to Go From Here

Go to Registering and Configuring Sun Cluster HA for SAP.

Registering and Configuring Sun Cluster HA for SAP

This section contains the procedures you need to configure Sun Cluster HA for SAP.

Sun Cluster HA for SAP Extension Properties

Use the extension properties in Sun Cluster HA for SAP Extension Properties for the Central Instance and Sun Cluster HA for SAP Extension Properties for the Application Servers to create your resources. Use the command line scrgadm -x parameter=value to configure extension properties when you create your resource. Use the procedure in “Administering Data Service Resources” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure the extension properties if you have already created your resources. You can update some extension properties dynamically. You can update others, however, only when you create or disable a resource. The Tunable entries indicate when you can update each property. See “Standard Properties” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on all Sun Cluster properties.

Sun Cluster HA for SAP Extension Properties for the Central Instance

SAP configuration extension properties are as follows:

SAPSID

SAP system ID or SID.

Default: None

Tunable: When disabled

Ci_instance_id

Two-digit SAP system number.

Default: 00

Tunable: When disabled

Ci_services_string

String of central instance services.

Default: DVEBMGS

Tunable: When disabled

Starting SAP extension properties are as follows:

Ci_start_retry_interval

The interval in seconds to wait between attempting to connect to the database before starting the central instance.

Default: 30

Tunable: When disabled

Ci_startup_script

Name of the SAP startup script for this instance in your SIDadm home directory.

Default: None

Tunable: When disabled

Stopping SAP extension properties are as follows:

Stop_sap_pct

Percentage of stop-timeout variables that are used to stop SAP processes. The SAP shutdown script is used to stop processes before calling Process Monitor Facility (PMF) to terminate and then kill the processes.

Default: 95

Tunable: When disabled

Ci_shutdown_script

Name of the SAP shutdown script for this instance in your SIDadm home directory.

Default: None

Tunable: When disabled

Probe extension properties are as follows:

Message_server_name

The name of the SAP Message Server.

Default: sapms SAPSID

Tunable: When disabled

Lgtst_ms_with_logicalhostname

How to check the SAP Message Server with the SAP lgtst utility. The lgtst utility requires a hostname (IP address) as the location for the SAP Message Server. This hostname can be either a Sun Cluster logical hostname or a local host (loopback) name. If you set this resource property to TRUE, use a logical hostname. Otherwise, use a localhost name.

Default: TRUE

Tunable: Any time

Check_ms_retry

Maximum number of times the SAP Message Server check fails before a total failure is reported and the Resource Group Manager (RGM) starts.

Default: 2

Tunable: When disabled

Probe_timeout

Timeout value in seconds for the probes.

Default: 120

Tunable: Any time

Monitor_retry_count

Number of PMF restarts that are allowed for the fault monitor.

Default: 4

Tunable: Any time

Monitor_retry_interval

Time interval in minutes for the fault monitor restarts.

Default: 2

Tunable: Any time

Development system extension properties are as follows:

Shutdown_dev

Whether the RGM should shut down the development system before starting up the central instance.

Default: FALSE

Tunable: When disabled

Dev_sapsid

SAP System Name for the development system (if you set Shutdown_dev to TRUE, Sun Cluster HA for SAP requires this property).

Default: None

Tunable: When disabled

Dev_shutdown_script

Script that is used to shut down the development system. If you set Shutdown_dev to TRUE, Sun Cluster HA for SAP requires this property.

Default: None

Tunable: When disabled

Dev_stop_pct

Percentage of startup timeouts Sun Cluster HA for SAP uses to shut down the development system before starting the central instance.

Default: 20

Tunable: When disabled

Sun Cluster HA for SAP Extension Properties for the Application Servers

SAP configuration extension properties are as follows:

SAPSID

SAP system name or SAPSID for the application server.

Default: None

Tunable: When disabled

As_instance_id

Two-digit SAP system number for the application server.

Default: None

Tunable: When disabled

As_services_string

String of application server services.

Default: D

Tunable: When disabled

Starting SAP extension properties are as follows:

As_db_retry_interval

The interval in seconds to wait between attempting to connect to the database and starting the application server.

Default: 30

Tunable: When disabled

As_startup_script

Name of the SAP startup script for the application server.

Default: None

Tunable: When disabled

Stopping SAP extension properties are as follows:

Stop_sap_pct

Percentage of stop-timeout variables that are used to stop SAP processes. The SAP shutdown script is used to stop processes before calling Process Monitor Facility (PMF) to terminate and then kill the processes.

Default: 95

Tunable: When disabled

As_shutdown_script

Name of the SAP shutdown script for the application server.

Default: None

Tunable: When disabled

Probe extension properties are as follows:

Probe_timeout

Time-out value in seconds for the probes.

Default: 60

Tunable: Any time

Monitor_retry_count

Number of PMF restarts that the probe allows for the fault monitor.

Default: 4

Tunable: Any time

Monitor_retry_interval

Time interval in minutes for fault monitor restarts.

Default: 2

Tunable: Any time

How to Register and Configure Sun Cluster HA for SAP with Central Instance

Use this procedure to configure Sun Cluster HA for SAP with central instance.

  1. Become superuser on one of the nodes in the cluster that hosts the central instance.

  2. Register the resource type for the central instance.


    # scrgadm -a -t SUNW.sap_ci | SUNW.sap_ci_v2
    
  3. Add the HAStoragePlus resource to the central instance resource group.


    # scrgadm -a -t SUNW.HAStoragePlus
    # scrgadm -a -j ci-storage-resource \
    -g sap-ci-resource-group \
    -t SUNW.HAStoragePlus -x filesystemmountpoints=mountpoint, ... | 

    For more details on how to set up an HAStoragePlus resource, see “Enabling Highly Available Local File Systems” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

  4. Enable the central instance storage resource.


    # scswitch -e -j ci-storage-resource
    
  5. Create SAP central instance resources in this failover resource group.


    # scrgadm -a -j sap-ci-resource \
    -g sap-ci-resource-group\
    -t SUNW.sap_ci | SUNW.sap_ci_v2
    -x SAPSID=SAPSID -x Ci_instance_id=ci-instance-id \
    -x Ci_startup_script=ci-startup-script \
    -x Ci_shutdown_script=ci-shutdown-script \
    -y resource_dependencies=ci-storage-resource
    

    See Sun Cluster HA for SAP Extension Properties for a list of extension properties.

  6. Enable the failover resource group that now includes the SAP central instance resource.


    # scswitch -Z -g sap-ci-resource-group
    

    If you configure the central instance resource to shut down a development system, you will receive the following console message.


    ERROR  : SAPSYSTEMNAME not set
    Please check environment and restart

    This message is displayed when the central instance starts on a node that does not have the development system installed and that is not meant to run the central instance. SAP renders this message, and you can safely ignore it.

Where to Go From Here

Go to How to Register and Configure Sun Cluster HA for SAP as a Failover Data Service or How to Register and Configure Sun Cluster HA for SAP as a Scalable Data Service.

How to Register and Configure Sun Cluster HA for SAP as a Failover Data Service

Use this procedure to configure Sun Cluster HA for SAP as a failover data service.

  1. Become superuser on one of the nodes in the cluster that hosts the application server.

  2. Register the resource type for the failover application server.


    # scrgadm -a -t SUNW.sap_as | SUNW.sap_as_v2
    
  3. Add the HAStoragePlus resource to the failover application server resource group.


    # scrgadm -a -t SUNW.HAStoragePlus
    # scrgadm -a -j sap-as-storage-resource -g sap-as-fo-resource-group \
    -t SUNW.HAStoragePlus \
    -x filesystemmountpoints=mountpoint, ...
    

    For more details on how to set up an HAStoragePlus resource, see “Enabling Highly Available Local File Systems” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

  4. Enable the failover application server storage resource.


    # scswitch -e -j sap-as-storage-resource
    
  5. Create SAP application server resources in their failover resource group.


    # scrgadm -a -j sap-as-resource \
    -g sap-as-fo-resource-group \
    -t SUNW.sap_as | SUNW.sap_as_v2
    -x SAPSID=SAPSID -x As_instance_id=as-instance-id \
    -x As_startup_script=as-startup-script \
    -x As_shutdown_script=as-shutdown-script \
    -y resource_dependencies=sap-as-storage-resource
    

    See Sun Cluster HA for SAP Extension Properties for a list of extension properties.

  6. Enable the failover resource group that now includes the SAP application server resource.


    # scswitch -Z -g sap-as-fo-resource-group
    

Where to Go From Here

Go to How to Verify Sun Cluster HA for SAP Installation and Configuration and Central Instance.

How to Register and Configure Sun Cluster HA for SAP as a Scalable Data Service

Use this procedure to configure Sun Cluster HA for SAP as a scalable data service.

  1. Become superuser on one of the nodes in the cluster that hosts the application server.

  2. Create a scalable resource group for the application server.


    # scrgadm -a -g sap-as-sa-appinstanceid-resource-group \
    -y Maximum_primaries=value \
    -y Desired_primaries=value
    

    Note –

    Sun Cluster HA for SAP as a scalable data service does not use shared addresses because the SAP logon group performs the load balancing of the application server.



    Note –

    If you are using the SUNW.RGOffload resource type to offload an application server within this scalable application server resource group, then set Desired_primaries=0. See “Freeing Node Resources by Offloading Non-critical Resource Groups” in Sun Cluster Data Servicse Planning and Administration Guide for Solaris OS for more information about using the SUNW.RGOffload resource type.


  3. Register the resource type for the scalable application server.


    # scrgadm -a -t SUNW.sap_as_v2
    
  4. Add the HAStoragePlus resource to the failover application server resource group.


    # scrgadm -a -t SUNW.HAStoragePlus 
    # scrgadm -a -j sap-as-storage-resource -g \
    -g sap-as-sa-appinstanceid-resource-group \
    -t SUNW.HAStoragePlus \
    -x filesystemmountpoints=mountpoint, ... \

    For more details on how to set up an HAStoragePlus resource, see “Enabling Highly Available Local File Systems” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

  5. Enable the failover application server storage resource.


    # scswitch -e -j sap-as-storage-resource
    
  6. Create SAP application server resources in this scalable resource group.


    # scrgadm -a -j sap-as-resource \
    -g sap-as-sa-appinstanceid-resource-group \
    -t SUNW.sap_as_v2 \
    -x SAPSID=SAPSID  \
    -x As_instance_id=as-instance-id \
    -x As_startup_script=as-startup-script \
    -x As_shutdown_script=as-shutdown-script \
    -y resource_dependencies=sap-as-storage-resource
    

    See Sun Cluster HA for SAP Extension Properties for a list of extension properties.

  7. Enable the scalable resource group that now includes the SAP application server resource.

    • If you do not use the RGOffload resource type with this application server, use the following command.


      # scswitch -Z -g sap-as-sa-appinstanceid-resource-group
      
    • If you use the RGOffload resource type with this application server, use the following command.


      # scswitch -z -h node1, node2 -g sap-as-sa-appinstanceid-resource-group
      

    Note –

    If you use the SUNW.RGOffload resource type with this application server, you must specify which node you want to bring the resource online by using the -z option instead of the -j option.


Where to Go From Here

Go to How to Verify Sun Cluster HA for SAP Installation and Configuration and Central Instance.

Setting Up a Lock File

Use the procedure in this section to perform the following tasks.

Set up a lock file to prevent multiple startups of the SAP instance when the instance is already active on one node. Multiple startups of the same instance crash each other. Furthermore, the crash prevents SAP shutdown scripts from performing a clean shutdown of the instances, which might cause data corruption.

If you set up a lock file, when you start the SAP instance the SAP software locks the file startup_lockfile. If you start up the same instance outside of the Sun Cluster environment and then try to bring up SAP under the Sun Cluster environment, the Sun Cluster HA for SAP data service will attempt to start up the same instance. However, because of the file-locking mechanism, this attempt will fail. The data service will log appropriate error messages in /var/adm/messages.

The only difference between the lock file for the central instance or the failover application server and the lock file for a scalable application server is that the lock file for scalable application server resides on the local file system and the lock file for the central instance or the failover application server resides on a cluster file system.

How to Set Up a Lock File for Central Instance or the Failover Application Server

Use this procedure to set up a lock file for the central instance or the failover application server.

  1. Install the latest patch for the sapstart executable, which enables Sun Cluster HA for SAP users to configure a lock file.

  2. Set up the central instance lock file or the failover application server lock file on a cluster file system.

  3. Edit the profile that sapstart uses to start the instance such that you add the new SAP parameter, sapstart/lockfile, for central instance or failover application server. This profile is the one that is passed to sapstart as a parameter in the startsap script.

    For central instance, enter the following.


    sapstart/lockfile =/usr/sap/SID/ Service-StringSystem-Number/work/startup_lockfile
    

    For failover application server, enter the following.


    sapstart/lockfile =/usr/sap/SID/ Dinstance-id/work/startup_lockfile
    
    sapstart/lockfile

    New parameter name.

    /usr/sap/SID/Service-StringSystem-Number/work

    Work directory for the central instance.

    /usr/sap/SID/Dinstance-id/work

    Work directory for failover application server.

    startup_lockfile

    Lock file name that Sun Cluster HA for SAP uses.

    SAP creates the lock file.


    Note –

    You must locate the lock file path on a cluster file system. If you locate the lock file path locally on the nodes, a startup of the same instance from multiple nodes cannot be prevented.


How to Set Up a Lock File for Scalable Application Server

Use this procedure to set up a lock file for a scalable application server.

  1. Install the latest patch for the sapstart executable, which enables Sun Cluster HA for SAP users to configure a lock file.

  2. Set up the application server lock file on the local file system.

  3. Edit the profile that sapstart uses to start the instance such that you add the new SAP parameter, sapstart/lockfile, for scalable application server. This profile is the one that is passed to sapstart as a parameter in the startsap script.


    sapstart/lockfile =/usr/sap/local/SID/Dinstance-id/work/startup_lockfile
    
    sapstart/lockfile

    New parameter name.

    /usr/sap/local/SID/Dinstance-id/work

    Work directory for the scalable application server.

    startup_lockfile

    Lock file name that Sun Cluster HA for SAP uses.

    SAP creates the lock file.


    Note –

    The lock file will reside on the local file system. The lock file does not prevent multiple startups from other nodes, but the lock file does prevent multiple startups on the same node.


Verifying the Sun Cluster HA for SAP Installation and Configuration

This section contains the procedure you need to verify that you installed and configured your data service correctly.

How to Verify Sun Cluster HA for SAP Installation and Configuration and Central Instance

Use this procedure to verify the Sun Cluster HA for SAP installation and configuration and central instance.

  1. Log in to the node that hosts the resource group that contains the SAP central instance resource.

  2. Start the SAP GUI to check that Sun Cluster HA for SAP is functioning correctly.

  3. As user sapsidadm, use the central instance stopsap script to shut down the SAP central instance.

    The Sun Cluster software restarts the central instance.

  4. As user root, switch the SAP resource group to another cluster member.


    # scswitch -z -h node2 -g sap-ci-resource-group
    
  5. Verify that the SAP central instance starts on this node.

  6. Repeat Step 1 through Step 5 until you have tested all of the potential nodes on which the SAP central instance can run.

Where to Go From Here

Go to How to Verify the Installation and Configuration of Sun Cluster HA for SAP as a Failover Data Service or How to Verify Sun Cluster HA for SAP Installation and Configuration of as a Scalable Data Service.

How to Verify the Installation and Configuration of Sun Cluster HA for SAP as a Failover Data Service

Use this procedure to verify the installation and configuration of Sun Cluster HA for SAP as a failover data service.

  1. Log in to the node that currently hosts the resource group that contains the SAP application server resource.

  2. As user sapsidadm, start the SAP GUI to check that the application server is functioning correctly.

  3. Use the application server stopsap script to shut down the SAP application server on the node you identified in Step 1.

    The Sun Cluster software restarts the application server.

  4. As user root, switch the resource group that contains the SAP application server resource to another cluster member.


    # scswitch -z -h node2 -g sap-as-resource-group
    
  5. Verify that the SAP application server starts on the node you identified in Step 4.

  6. Repeat Step 1 through Step 5 until you have tested all of the potential nodes on which the SAP application server can run.

How to Verify Sun Cluster HA for SAP Installation and Configuration of as a Scalable Data Service

Use this procedure to verify the installation and configuration of Sun Cluster HA for SAP as a scalable data service.

  1. Log on to one of the nodes that runs the application server.

  2. Become user sapsidadm.

  3. Start the SAP GUI to check that the application server is functioning correctly.

  4. Use the application server stopsap script to shut down the SAP application server on the node you identified in Step 1.

    The Sun Cluster software restarts the application server.

  5. Repeat Step 1 through Step 3 until you have tested all of the potential nodes on which the SAP application server can run.

Understanding Sun Cluster HA for SAP Fault Monitor

The Sun Cluster HA for SAP fault monitor checks SAP process and database availability. SAP process availability impacts SAP resources' failure history. SAP resources' failure history in turn drives the fault monitor's actions, which include no action, restart, or failover.

In contrast to SAP process availability, SAP database availability uses has no impact on SAP resources' failure history. Database availability does, however, trigger the SAP fault monitor to log any syslog messages to /var/adm/messages and to set the status accordingly for the SAP resource that uses the database.

Sun Cluster HA for SAP Fault Probes for Central Instance

For the central instance, the fault probe executes the following steps.

  1. Retrieves the process IDs for the SAP Message Server and the dispatcher

  2. Loops infinitely (sleeps for Thorough_probe_interval)

  3. Checks the availability of the SAP resources

    1. Abnormal exit – If the Process Monitor Facility (PMF) detects that the SAP process tree has failed, the fault monitor treats this problem as a complete failure. The fault monitor restarts or fails over the SAP resource to another node based on the resources' failure history.

    2. Availability check of the SAP resources through probe – The probe uses the ps(1) command to check the SAP Message Server and main dispatcher processes. If any of the SAP Message Server or main dispatcher processes are missing from the system's active processes list, the fault monitor treats this problem as a complete failure.

      If you configure the parameter Check_ms_retry to have a value greater than zero, the probe checks the SAP Message Server connection. If you have set the extension property Lgtst_ms_with_logicalhostname to its default value TRUE, the probe completes the SAP Message Server connection test with the utility lgtst. The probe uses the logical hostname interface that is specified in the SAP resource group to call the SAP-supplied utility lgtst. If you set the extension property Lgtst_ms_with_logicalhostname to a value other than TRUE, the probe calls lgtst with the node's local hostname (loopback interface).

      If the lgtst utility call fails, the SAP Message Server connection is not functioning. In this situation, the fault monitor considers the problem to be a partial failure and does not trigger an SAP restart or a failover immediately. The fault monitor counts two partial failures as a complete failure if the following conditions occur.

      1. You configure the extension property Check_ms_retry to be 2.

      2. The fault monitor accumulates two partial failures that happen within the retry interval that the resource property Retry_interval sets.

      A complete failure triggers either a local restart or a failover, based on the resource's failure history.

    3. Database connection status through probe – The probe calls the SAP-supplied utility R3trans to check the status of the database connection. Sun Cluster HA for SAP fault probes verify that SAP can connect to the database. Sun Cluster HA for SAP depends, however, on the highly available database fault probes to determine database availability. If the database connection status check fails, the fault monitor logs the message, Database might be down, to /var/adm/messages. The fault monitor then sets the status of the SAP resource to DEGRADED. If the probe checks the status of the database again and the connection is reestablished, the fault monitor logs the message, Database is up, to /var/adm/messages and sets the status of the SAP resource to OK.

  4. Evaluates the failure history

    Based on the failure history, the fault monitor completes one of the following actions.

    • no action

    • local restart

    • failover

Sun Cluster HA for SAP Fault Probes for Application Server

For the application server, the fault probe executes the following steps.

  1. Retrieves the process ID for the main dispatcher

  2. Loops infinitely (sleeps for Thorough_probe_interval)

  3. Checks the availability of the SAP resources

    1. Abnormal exit – If the Process Monitor Facility (PMF) detects that the SAP process tree has failed, the fault monitor treats this problem as a complete failure. The fault monitor restarts or fails over the SAP resource to another node, based on the resources' failure history.

    2. Availability check of the SAP resources through probe – The probe uses the ps(1) command to check the SAP Message Server and main dispatcher processes. If the SAP main dispatcher process is missing from the system's active processes list, the fault monitor treats the problem as a complete failure.

    3. Database connection status through probe – The probe calls the SAP-supplied utility R3trans to check the status of the database connection. Sun Cluster HA for SAP fault probes verify that SAP can connect to the database. Sun Cluster HA for SAP depends, however, on the highly available database fault probes to determine database availability. If the database connection status check fails, the fault monitor logs the message, Database might be down, to /var/adm/messages and sets the status of the SAP resource to DEGRADED. If the probe checks the status of the database again and the connection is reestablished, the fault monitor logs the message, Database is up, to /var/adm/messages. The fault monitor then sets the status of the SAP resource to OK.

  4. Evaluates the failure history

    Based on the failure history, the fault monitor completes one of the following actions.

    • no action

    • local restart

    • failover

      If the application server resource is a failover resource, the fault monitor fails over the application server.

      If the application server resource is a scalable resource, after the number of local restarts are exhausted, RGM will bring up the application server on a different node if there is another node available in the cluster.