Sun Cluster Data Service for SAP DB Guide for Solaris OS

Installing and Configuring Sun Cluster HA for SAP DB

This chapter explains how to install and configure Sun Cluster HA for SAP DB.

This chapter contains the following sections.

Sun Cluster HA for SAP DB Overview

To eliminate single points of failure in an SAP DB system, Sun Cluster HA for SAP DB provides the following features:

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

Each component of SAP DB has data service that protects the component when the component is configured in Sun Cluster. See the following table.


Note –

The files that are associated with the SUNW.sap_xserver resource type are supplied with the Sun Cluster HA for SAP liveCache data service. The Sun Cluster HA for SAP liveCache data service is installed when you install Sun Cluster HA for SAP DB data service.


Table 1 Protection of SAP DB Components by Sun Cluster Data Services

SAP DBComponent 

Data Service 

SAP DB 

Sun Cluster HA for SAP DB 

The resource type is SUNW.sapdb.

SAP xserver 

Sun Cluster HA for SAP liveCache 

The resource type is SUNW.sap_xserver.

NFS file system 

Sun Cluster HA for NFS 

The resource type is SUNW.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 DB

The following table summarizes the tasks for installing and configuring Sun Cluster HA for SAP DB 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 DB

Task 

Cross-Reference 

Plan the Sun Cluster HA for SAP DB installation and configuration 

Your SAP documentation. 

Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Planning the Sun Cluster HA for SAP DB Installation and Configuration

Install and configure SAP DB 

Installing and Configuring SAP DB

Verify the SAP DB installation and configuration 

Verifying the SAP DB Installation and Configuration

Install the Sun Cluster HA for SAP DB packages 

Installing the Sun Cluster HA for SAP DB Packages

Configure the HAStoragePlus resource to work with Sun Cluster HA for SAP DB

Relationship Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Synchronizing the Startups Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Configuring the HAStoragePlus Resource Type to Work With Sun Cluster HA for SAP DB

Register and configure the Sun Cluster HA for SAP DB data service 

Registering and Configuring Sun Cluster HA for SAP DB

(Optional) Tune the Sun Cluster HA for SAP DB fault monitors 

Tuning the Sun Cluster HA for SAP DB Fault Monitors

(Optional) Use an alternate project identifier (ID) 

Data Service Project Configuration in Sun Cluster Concepts Guide for Solaris OS

Verify the Sun Cluster HA for SAP DB installation and configuration 

Verifying the Sun Cluster HA for SAP DB Installation and Configuration

(Optional) Upgrade the SUNW.sap_xserver resource type

Upgrading the SUNW.sap_xserver Resource Type

Planning the Sun Cluster HA for SAP DB Installation and Configuration

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


Note –

Before you begin, consult your SAP DB documentation for configuration restrictions and requirements that are not imposed by Sun Cluster software. For information about restrictions that the Sun Cluster software imposes, see the Sun Cluster documentation.


Configuration Requirements

The configuration requirements in this section apply only to Sun Cluster HA for SAP DB.


Caution – Caution –

If your data service configuration does not conform to 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.

SAP DB Software Version Requirements

Use SAP DB version 7.4 or compatible versions.

Sun Cluster HA for SAP DB Configuration Requirements

Configure Sun Cluster HA for SAP DB as a failover data service. You cannot configure Sun Cluster HA for SAP DB as a scalable data service. For more information, see the following sections:

SAP xserver Configuration Requirements

To enable client applications to access Sun Cluster HA for SAP DB, you must use SAP xserver. Configure SAP xserver as a scalable data service. Do not configure SAP xserver as a failover data service.

Configure SAP xserver so that SAP xserver starts on all nodes to which the SAP DB resource can fail over. To implement this configuration, ensure that the node list of the SAP xserver resource group contains all nodes that are in the node list of the SAP DB resource group. For more information, see How to Register and Configure an SAP xserver Resource.

Supported Configurations of This Data Service

The Sun Cluster HA for SAP DB data service supports configurations that conform to the requirements in Configuration Requirements.

If you plan to use SAP DB with other highly available SAP applications, you must also configure the Sun Cluster data services for those applications. For more information, see the following table.

SAP Application 

Sun Cluster Data Service 

Associated Document 

SAP R/3 

Sun Cluster HA for SAP 

Sun Cluster Data Service for SAP Guide for Solaris OS

SAP liveCache 

Sun Cluster HA for SAP liveCache 

Sun Cluster Data Service for SAP liveCache Guide for Solaris OS

The examples that follow show these supported configurations of Sun Cluster HA for SAP DB:


Note –

Sun Cluster HA for SAP DB might support additional configurations. However, you must contact your Sun service provider for information about additional configurations.



Example 1 Two-Node Configuration

This example shows a two-node configuration in which a client application accesses the SAP DB resource through the SAP xserver resource. The characteristics of this configuration are as follows:

Illustration: The preceding context describes the graphic.

Example 2 Four-Node Configuration With SAP R/3

This example shows a four-node configuration in which SAP DB is used with SAP R/3. This configuration uses multiple Advanced Planner & Optimizer (APO) application servers. The characteristics of this configuration are as follows:

Illustration: The preceding context describes the graphic.

Example 3 Four-Node Configuration With SAP R/3 and SAP liveCache

This example shows a four-node configuration in which SAP DB is used with SAP R/3 and SAP liveCache. This configuration uses multiple APO application servers. The characteristics of this configuration are as follows:

Illustration: The preceding context describes the graphic.

Configuration Considerations

The configuration considerations in the subsections that follow affect the installation and configuration of Sun Cluster HA for SAP DB.

Device Group for the SAP DB Application

Ensure that you create a device group for the SAP DB application as follows:

Dependencies of the SAP DB Application on SAP xserver

Configure SAP DB so that SAP DB starts only on a node where SAP xserver is running. To implement this configuration, configure resources and resource groups as follows:

For more information, see Registering and Configuring Sun Cluster HA for SAP DB.

Administration of SAP xserver by a User Other Than Root

You might be required to administer SAP xserver as a user other than root. In this situation, you must create and define that user as follows:

Configuration Planning Questions

Answer the questions in this section to plan the installation and configuration of Sun Cluster HA for SAP DB. Write the answers to these questions in the space that is provided on the data service worksheets in Appendix C, Data Service Configuration Worksheets and Examples, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Installing and Configuring SAP DB

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

During a standard installation, SAP DB is installed with a physical host name. To enable SAP DB to run in a cluster, you must modify SAP DB to use a logical host name.

For information about the standard installation and standard configuration of SAP DB, see the following documentation:

ProcedureHow to Install and Configure SAP DB

Steps
  1. On one node of the cluster, install the SAP DB software.

    Ensure that you install SAP DB on its own global device group.

  2. Perform a standard configuration of SAP DB.

  3. Create the .XUSER.62 file in the home directory of the operating system (OS) user who administers the SAP DB instance.

    1. Create a plain text file that contains information about the database user who administers the SAP DB database instance.

      For information about the content of this file, see the SAP DB documentation. For the name of the server on which the database is running, specify the logical host name for the SAP DB resource that you specified in Configuration Planning Questions.

      For an example of the content of this file, see Example 4.

    2. Generate the .XUSER.62 file from the plain text file that you created in Step a.

      Use the SAP DB command xuser for this purpose.


      # xuser -b user-info-file
      
      -b user-info-file

      Specifies the plain text file from which you are generating the .XUSER.62 file

  4. Copy the /usr/spool/sql directory and its contents from the node on which you installed SAP DB to all nodes where resources for SAP DB and SAP xserver will run.

    To ensure that the same owner owns the directory and its contents on all nodes, use the tar(1) command and the rsh(1)


    # tar cfB - /usr/spool/sql | rsh destination tar xfB -
    
    destination

    Specifies the node to which you are copying the /usr/spool/sql directory and its contents

    The following example shows a plain text file that contains information about a database user who administers an SAP DB instance.


Example 4 Information About a Database User Who Administers an SAP DB Instance

DEFAULT
dbm
dbm
TST
srvr-1
blank line
blank line
-1
-1
blank line		

This example specifies the following information about a database user who administers an SAP DB instance:

For more information, see the SAP DB documentation.


ProcedureHow to Enable SAP DB to Run in a Cluster

Steps
  1. Create a failover resource group to contain the SAP DB application resources and the logical host name for the SAP DB resource.

    Use the resource group that you identified when you answered the questions in Configuration Planning Questions.


    # scrgadm -a -g sapdb-rg[ -h nodelist]
    -a

    Specifies that a new configuration is to be added.

    -g sapdb-rg

    Specifies that the resource group that you are creating is named sapdb-rg.

    -h nodelist

    Specifies a comma-separated list of nodes where the resource group can be brought online. Specifying a node list is optional. If you omit the node list, the resource group can be brought online on all cluster nodes.

  2. Ensure that all network resources that you intend to you use are added to your name service database.

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


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

    Specifies that a new configuration is to be added.

    -L

    Species that a logical host name resource is to be added.

    -g sapdb-rg

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

    -l sapdb-logical-hostname

    Specifies the logical host name of the server on which the database is running. This host name must be the logical host name for the SAP DB resource that you specified in Configuration Planning Questions.

    -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. Enable the resource group that you created in Step 1.


    # scswitch -Z -g sapdb-rg
    
    -Z

    Moves a resource group to the MANAGED state and brings the resource group online

    -g sapdb-rg

    Specifies that the resource group that you created in Step 1 is to be moved to the MANAGED state and brought online


Example 5 Enabling SAP DB to Run in a Cluster

This example shows the sequence of commands that are required to enable SAP DB to run in a cluster. The commands are run on only one cluster node.

  1. The following command creates a failover resource group to contain the SAP DB application resources and the logical host name for the SAP DB resource. The resource group is named sapdbrg. The sapdbrg resource group can be brought online on all cluster nodes.


    # scrgadm -a -g sapdbrg
    
  2. The following command adds a logical host name resource to the sapdbrg resource group. The logical host name of the server on which the database is running is srvr-1. When the sapdbrg resource group is brought online, an attempt is made for each node to discover a network interface on the subnet that the host name list identifies.


    # scrgadm -a -L -g sapdbrg -l srvr-1 
    
  3. The following command moves the sapdbrg resource group to the MANAGED state and brings the resource group online.


    # scswitch -Z -g sapdbrg
    

Verifying the SAP DB Installation and Configuration

Before you install the Sun Cluster HA for SAP DB packages, verify that the SAP DB software is correctly installed and configured to run in a cluster. This verification does not verify that the SAP DB application is highly available because the Sun Cluster HA for SAP DB data service is not yet installed.

ProcedureHow to Verify SAP DB Installation and Configuration on Each Node

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

Steps
  1. Log in as superuser to a node that can master the SAP DB resource group.

  2. Switch the SAP DB resource group to the node that you logged in to in Step 1.


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

    Specifies that the node that masters a resource group is to be switched

    -g sapdb-rg

    Specifies that the SAP DB resource group is to be switched to another node

    -h node

    Specifies the node to which the SAP DB resource group is to be switched

  3. Confirm that the SAP DB database can be started and be stopped.

    1. Become the OS user who administers the SAP DB database.


      # su - os-sapdb-adm-user
      
      os-sapdb-adm-user

      Specifies the UNIX user identity of the OS user who administers the SAP DB database. This user's home directory contains the .XUSER.62 file that was created during the installation and configuration of SAP DB. For more information, see Installing and Configuring SAP DB. You specify this user when you set the DB_User extension property as explained in How to Register and Configure an SAP DB Resource.

    2. Start the SAP xserver.


      # x_server start
      
    3. Manually start the SAP DB database instance on the node that you logged in to in Step 1.


      # dbmcli -U sapdb-adm-key db_online
      
      -U sapdb-adm-key

      Specifies that the dbmcli command is run with the user key of the database user who administers the SAP DB instance. This user key is created during the installation and configuration of SAP DB. For more information, see Installing and Configuring SAP DB. You specify this user key when you set the User_Key extension property as explained in How to Register and Configure an SAP DB Resource.

    4. Confirm that the SAP DB database instance is started.

    5. Manually stop the SAP DB database instance.


      # dbmcli -U sapdb-adm-key db_offline
      
      -U sapdb-adm-key

      Specifies that the dbmcli command is run with the user key that you used for starting the database in Step c

    6. Confirm that the SAP DB database instance is stopped.

Installing the Sun Cluster HA for SAP DB Packages

If you did not install the Sun Cluster HA for SAP DB 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 DB packages. To complete this procedure, you need the Sun Cluster Agents CD-ROM.

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


Requirements for Installing With an Existing Version of Sun Cluster HA for SAP liveCache

The files that are associated with the SUNW.sap_xserver resource type are supplied with the Sun Cluster HA for SAP liveCache data service. The installation tools install the Sun Cluster HA for SAP liveCache data service when you install the Sun Cluster HA for SAP DB data service.

If you are using any version of Sun Cluster HA for SAP liveCache in the following list, you must upgrade to version 3.1 4/04 of Sun Cluster HA for SAP liveCache before you install the Sun Cluster HA for SAP DB data service:

For instructions for upgrading Sun Cluster software, see Chapter 5, Upgrading Sun Cluster Software, in Sun Cluster Software Installation Guide for Solaris OS.

ProcedureHow to Install the Sun Cluster HA for SAP DB 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 DB 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-ROM 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 DB component directory of the CD-ROM.

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


    # cd /cdrom/cdrom0/components/SunCluster_HA_SAPDB_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 DB 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-ROM 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 Configuring the HAStoragePlus Resource Type to Work With Sun Cluster HA for SAP DB.

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

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

Before You Begin

Ensure that you have the Sun Cluster Agents CD-ROM.

Steps
  1. Load the Sun Cluster Agents CD-ROM 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-ROM.

    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 Configuring the HAStoragePlus Resource Type to Work With Sun Cluster HA for SAP DB.

Configuring the HAStoragePlus Resource Type to Work With Sun Cluster HA for SAP DB

For maximum availability of the SAP DB database, resources that Sun Cluster HA for SAP DB requires must be available before the SAP DB database instance is started. An example of such a resource is the file system where programs and libraries for the SAP DB runtime environment reside. To ensure that these resources are available, configure the HAStoragePlus resource type to work with Sun Cluster HA for SAP DB.

For information about the relationship between resource groups and disk device groups, see Relationship Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.

Configuring the HAStoragePlus resource type to work with Sun Cluster HA for SAP DB involves the following operations:

ProcedureHow to Register and Configure an HAStoragePlus Resource

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 SAP DB is installed.

    Create this resource in the SAP DB resource group. This resource must perform an affinity switchover for all global devices that are defined for this resource.


    # scrgadm -a -j hsp-resource -g sapdb-rg \
    -t SUNW.HAStoragePlus -x filesystemmountpoints=mountpoint-list \
    -x globaldevicepaths=sapdb-device-group -x affinityon=TRUE
    
    -a

    Specifies that a new configuration is to be added.

    -j hsp-resource

    Specifies that the resource that you are creating is named hsp-resource.

    -g sapdb-rg

    Specifies that the resource is to be added to the SAP DB 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=sapdb-device-group

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

    -x affinityon=TRUE

    Specifies that this resource performs an affinity switchover for all global devices that are defined for this resource.

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


    # scswitch -ej hsp-resource
    
    -ej hsp-resource

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


Example 6 Creating an HAStoragePlus Resource


# scrgadm -a -j hsprs  -g sapdbrg \
-t SUNW.HAStoragePlus -x filesystemmountpoints=/global/sapdbdata \
-x globaldevicepaths=sapdbdg  -x affinityon=TRUE

This example shows the creation of a SUNW.HAStoragePlus resource that has the following characteristics:


Next Steps

Go to Registering and Configuring Sun Cluster HA for SAP DB.

Registering and Configuring Sun Cluster HA for SAP DB

To enable Sun Cluster HA for SAP DB to make SAP DB highly available, configure Sun Cluster data services as follows:

Before you perform this procedure, ensure that the Sun Cluster HA for SAP DB data service packages are installed.


Caution – Caution –

One SAP xserver serves multiple SAP DB instances and, if SAP liveCache is used, multiple SAP liveCache instances in the cluster. Therefore, do not configure more than one SAP xserver resource on the same cluster. If more than one SAP xserver resource runs on the same cluster, conflicts between the SAP xserver resources occur. These conflicts cause all SAP xserver resources to become unavailable. If you attempt to start the SAP xserver a second time, the attempt fails. The error message Address already in use is also displayed.


Setting Sun Cluster HA for SAP DB Extension Properties

The sections that follow contain instructions for registering and configuring resources. These instructions explain how to set only extension properties that Sun Cluster HA for SAP DB requires you to set. For information about all Sun Cluster HA for SAP DB extension properties, see Appendix A, Sun Cluster HA for SAP DB 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.

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.

Administering SAP xserver as a User Other Than Root

You might be required to administer SAP xserver as a user other than root. In this situation, you must create and define that user as follows:

ProcedureHow to Register and Configure an SAP xserver Resource

Steps
  1. Become superuser on a cluster node.

  2. Register the SUNW.sap_xserver resource type.


    # scrgadm -a -t SUNW.sap_xserver
    
  3. Create a scalable resource group for the SAP xserver resource.

    Configure SAP xserver so that SAP xserver starts on all nodes to which the SAP DB resource can fail over. To implement this configuration, ensure that the node list of the SAP xserver resource group contains all nodes that are in the node list of the SAP DB resource group. This resource group is created when the procedure How to Enable SAP DB to Run in a Cluster is performed.


    # scrgadm -a -g xserver-rg \
    -y Maximum_primaries=nodes-in-sapdb-rg \
    -y Desired_primaries=nodes-in-sapdb-rg \
    -h nodelist
    
    -a

    Specifies that a new configuration is to be added.

    -g xserver-rg

    Specifies that the resource group that you are creating is named xserver-rg.

    -y Maximum_primaries=nodes-in-sapdb-rg

    Specifies the maximum number of nodes on which the SAP xserver resource can start. This number is equal to the number of nodes that are in the node list of the SAP DB resource group. You must specify the same number as the value of the Desired_primaries property.

    -y Desired_primaries=nodes-in-sapdb-rg

    Specifies the desired number of nodes on which the SAP xserver resource can start. This number is equal to the number of nodes that are in the node list of the SAP DB resource group. You must specify the same number as the value of the Maximum_primaries property.

    -h nodelist

    Specifies a comma-separated list of nodes where the resource group can be brought online. Ensure that this node list contains all nodes that are in the node list of the SAP DB resource group.

  4. Create an SAP xserver resource in the resource group that you created in Step 3.


    # scrgadm -a -j xserver-resource -g xserver-rg -t SUNW.sap_xserver 
    
    -a

    Specifies that a new configuration is to be added

    -j xserver-resource

    Specifies that the resource that you are creating is named xserver-resource

    -g xserver-rg

    Specifies that the resource is to be added to the resource group that you created in Step 3

    -t SUNW.sap_xserver

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

  5. Enable the resource group that you created in Step 3.


    # scswitch -Z -g xserver-rg
    
    -Z

    Moves a resource group to the MANAGED state and brings the resource group online

    -g xserver-rg

    Specifies that the resource group that you created in Step 3 is to be moved to the MANAGED state and brought online


Example 7 Configuring a SUNW.sap_xserver Resource

This example shows the sequence of commands that are required to configure an SAP xserver resource. The commands are run on only one cluster node.

  1. The following command creates a scalable resource group to contain an SAP xserver resource for a four-node cluster. The resource group is named xsrvrrg. The xsrvrrg resource group can be brought online on all cluster nodes.


    # scrgadm -a -g xsrvrrg \
    -y Maximum_primaries=4 \
    -y Desired_primaries=4 
    
  2. The following command creates an SAP xserver resource that is named xsrvrrs in the xsrvrrg resource group. The SAP xserver resource is an instance of the SUNW.sap_xserver resource type. The registration of this resource type is not shown in this example.


    # scrgadm -a -j xsrvrrs  -g xsrvrrg -t SUNW.sap_xserver 
    
  3. The following command moves the xsrvrrg resource group to the MANAGED state and brings the resource group online.


    # scswitch -Z -g 
    

ProcedureHow to Register and Configure an SAP DB Resource

Steps
  1. Register the SUNW.sapdb resource type.


    # scrgadm -a -t SUNW.sapdb
    
  2. Create an SAP DB resource in the SAP DB resource group.

    Ensure that the SAP DB resource depends on the following resources:

    • The HAStoragePlus resource for the global device group on which SAP DB is installed

    • The SAP xserver resource

    When you create this resource, specify the following information about the SAP DB database instance. This information is created when SAP DB is installed and configured as explained in Installing and Configuring SAP DB.

    • The name of the SAP DB database

    • The UNIX user identity of the OS user who administers the SAP DB database instance

    • The user key of the database user who administers the SAP DB database instance


    # scrgadm -a -j sapdb-rs -g sapdb-rg -t SUNW.sapdb \
    -x DB_Name=db-name -x DB_User=os-sapdb-adm-user \
    -x User_Key=sapdb-adm-key -y resource_dependencies=hsp-resource,xserver-resource
    
    -a

    Specifies that a new configuration is to be added.

    -j sapdb-rs

    Specifies that the resource that you are creating is named sapdb-rs.

    -g sapdb-rg

    Specifies that the resource is to be added to the SAP DB resource group.

    -t SUNW.sapdb

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

    -x DB_Name=db-name

    Specifies the name of the SAP DB database instance in uppercase.

    -x DB_User=os-sapdb-adm-user

    Specifies the UNIX user identity of the OS user who administers the SAP DB database. This user's home directory contains the .XUSER.62 file that was created during the installation and configuration of SAP DB. For more information, see Installing and Configuring SAP DB.

    -x User_Key=sapdb-adm-key

    Specifies the user key of the database user who administers the SAP DB database instance. This user key is created during the installation and configuration of SAP DB. For more information, see Installing and Configuring SAP DB.

    -y resource_dependencies=hsp-resource,xserver-resource

    Specifies that the SAP DB resource depends on the following resources

    • The HAStoragePlus resource for the global device group on which SAP DB is installed

    • The SAP xserver resource

  3. Ensure that the SAP DB resource group is brought online only on a node where the SAP xserver resource group is online.

    To meet this requirement, create on the SAP DB resource group a strong positive affinity for the SAP xserver resource group.


    # scrgadm -c -g sapdb-rg -y rg_affinities=++xserver-rg
    
    -c

    Specifies that an existing configuration is to be modified

    -g sapdb-rg

    Specifies that the SAP DB resource group is to be modified

    -y rg_affinities=++xserver-rg

    Specifies that the SAP DB resource group declares a strong positive affinity for the SAP xserver resource group

  4. Enable the SAP DB resource group.


    # scswitch -Z -g sapdb-rg
    
    -Z

    Moves a resource group to the MANAGED state and brings the resource group online

    -g sapdb-rg

    Specifies that the SAP DB resource group is to be moved to the MANAGED state and brought online

  5. (Optional) Consider configuring your cluster to prevent noncritical resource groups from being brought online on the same node as the SAP DB resource group.

    You might plan to run lower-priority services on a node to which the SAP DB resource can fail over. In this situation, consider using resource group affinities to shut down the noncritical services when the SAP DB resource fails over to the node.

    To specify this behavior, declare on the resource group for each noncritical service a strong negative affinity for the SAP DB resource group.


    # scrgadm -c -g noncritical-rg \
    -y rg_affinities=--sapdb-rg
    
    -c

    Specifies that an existing configuration is to be modified

    -g noncritical-rg

    Specifies that the resource group for a noncritical service is to be modified

    -y rg_affinities=--sapdb-rg

    Specifies that the resource group for a noncritical service declares a strong negative affinity for the SAP DB resource group


Example 8 Creating a SUNW.sapdb Resource


# scrgadm -a -j sapdbrs -g sapdbrg -t SUNW.sapdb \
-x DB_Name=TST -x DB_User=dbadmin \
-x User_Key=DEFAULT -y resource_dependencies=hsprs,xsrvrrs

This example shows the creation of a SUNW.sapdb resource that has the following characteristics:


Tuning the Sun Cluster HA for SAP DB Fault Monitors

Fault monitoring for the Sun Cluster HA for SAP DB 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 Sun Cluster HA for SAP DB Fault Monitors

Fault Monitor 

Resource Type 

SAP DB 

SUNW.sapdb

SAP xserver 

SUNW.sap_xserver

System properties and extension properties of these resources 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 Sun Cluster HA for SAP DB fault monitors only if you need to modify this preset behavior.

Tuning the Sun Cluster HA for SAP DB fault monitors involves the following tasks:

For more information, see Tuning Fault Monitors for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. Information about the Sun Cluster HA for SAP DB fault monitors that you need to perform these tasks is provided in the subsections that follow.

Sun Cluster HA for SAP DB also enables you to control how the fault monitor responds if the SAP DB parent kernel process is not running. For more information, see Forcing the SAP DB Database Instance to Be Restarted if the Parent Kernel Process Is Terminated.

Tune the Sun Cluster HA for SAP DB fault monitors when you register and configure Sun Cluster HA for SAP DB. For more information, see Registering and Configuring Sun Cluster HA for SAP DB.

Factors That Affect the Interval Between Fault Monitor Probes

To determine whether SAP xserver and the SAP DB database instance are operating correctly, the Sun Cluster HA for SAP DB fault monitors probe these resources periodically. The optimum interval between fault monitor probes depends on the time that is required to respond to a fault in a resource. This time depends on how the complexity of the resource affects the time that is required for operations such as restarting the resource.

For example, SAP xserver is a much simpler resource and can be restarted much quicker than SAP DB. Therefore, the optimum interval between fault monitor probes of SAP xserver is shorter than the optimum interval between probes of SAP DB.

Operations by the Sun Cluster HA for SAP DB Fault Monitors During a Probe

The optimum timeout for fault monitor probes depends on the operations that a fault monitor performs to probe the resource.

Operations by the SAP DB Fault Monitor During a Probe

During a probe, the SAP DB fault monitor performs the following operations:

  1. The SAP DB fault monitor determines whether the SAP DB database instance is online.

  2. If the SAP DB database instance is online, the SAP DB fault monitor determines whether the parent kernel process of the SAP DB database instance is running. You can control how the fault monitor responds if the parent kernel process is not running. For more information, see Forcing the SAP DB Database Instance to Be Restarted if the Parent Kernel Process Is Terminated.

  3. The SAP DB fault monitor determines whether SAP xserver is available. This fault monitoring supplements the fault monitoring that the SAP xserver fault monitor provides.

Operations by the SAP xserver Fault Monitor During a Probe

During a probe, the SAP xserver fault monitor determines whether SAP xserver is available.

Faults Detected by the Sun Cluster HA for SAP DB Fault Monitors

Faults that each Sun Cluster HA for SAP DB fault monitor detects are described in the subsections that follow.

Faults Detected by the SAP DB Fault Monitor

The SAP DB fault monitor detects the following faults in SAP DB:

The SAP DB fault monitor also detects the unavailability of SAP xserver. This fault monitoring supplements the fault monitoring that the SAP xserver fault monitor provides.


Note –

If the SAP DB fault monitor detects that SAP xserver is unavailable twice within the retry interval, the SAP DB fault monitor restarts SAP DB. By restarting SAP DB, the fault monitor ensures that the SAP DB database fails over to another node when SAP xserver is persistently unavailable.


Faults Detected by the SAP xserver Fault Monitor

The SAP xserver fault monitor detects following faults:

Recovery Actions in Response to Detected Faults

To minimize the disruption that transient faults in a resource cause, a fault monitor restarts the resource in response to such faults. For persistent faults, more disruptive action than restarting the resource is required:

Forcing the SAP DB Database Instance to Be Restarted if the Parent Kernel Process Is Terminated

By default, unexpected termination of the parent kernel process does not cause the SAP DB fault monitor to restart the SAP DB database instance. The SAP DB database instance can continue to function without the parent kernel process. Restarting the SAP DB database instance in this situation might cause unnecessary unavailability of the SAP DB database instance. Therefore, you should force the SAP DB database instance to be restarted only if you require a feature that the parent kernel process provides. An example of such a feature is maintaining the integrity of the log history.

To force the SAP DB database instance to be restarted if the parent kernel process is terminated, set the Restart_if_Parent_Terminated extension property of the SUNW.sapdb resource to True.

Verifying the Sun Cluster HA for SAP DB Installation and Configuration

After you install, register, and configure Sun Cluster HA for SAP DB, verify the Sun Cluster HA for SAP DB installation and configuration. Verifying the Sun Cluster HA for SAP DB installation and configuration determines if the Sun Cluster HA for SAP DB data service makes the SAP DB application highly available.

Verifying the Sun Cluster HA for SAP DB installation involves verifying the operation of the following fault monitors:

ProcedureHow to Verify the Operation of the SAP DB Fault Monitor

Perform this procedure on each node where SAP DB can run.

Steps
  1. Log in as superuser to a node that can master the SAP DB resource group.

  2. Switch the SAP DB resource group to the node that you logged in to in Step 1.


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

    Specifies that the node that masters a resource group is to be switched

    -g sapdb-rg

    Specifies that the SAP DB resource group is to be switched to another node

    -h node

    Specifies the node to which the SAP DB resource group is to be switched

  3. Abnormally terminate SAP DB.

    1. Determine the process identities of all kernel processes for the SAP DB database instance that you are running.


      # ps -ef | grep kernel | grep db-name
      
      db-name

      Specifies the name of the SAP DB database instance in uppercase

    2. Kill all kernel processes for the SAP DB database instance that you are running.


      # kill -9 sapdb-kernel-pid
      
      sapdb-kernel-pid

      Specifies the process identities of the SAP DB kernel processes that you determined in Step a

  4. Confirm that the Sun Cluster HA for SAP DB fault monitor performs the appropriate operation from the following list:

    • Restarting the SAP DB resource

    • Failing over the SAP DB resource to another node

    The expected behavior of the fault monitor depends on the failure history of the resource and the value of the Failover_enabled extension property. For more information, see the following sections:

  5. Terminate SAP DB normally.

    1. Become the OS user who administers the SAP DB database.


      # su - os-sapdb-adm-user
      
      os-sapdb-adm-user

      Specifies the UNIX user identity of the OS user who administers the SAP DB database. This user's home directory contains the .XUSER.62 file that was created during the installation and configuration of SAP DB. For more information, see Installing and Configuring SAP DB. You specify this user when you set the DB_User extension property as explained in How to Register and Configure an SAP DB Resource.

    2. Manually stop the SAP DB database instance.


      # dbmcli -U sapdb-adm-key db_offline
      
      -U sapdb-adm-key

      Specifies that the dbmcli command is run with the user key of the database user who administers the SAP DB database. This user key is created during the installation and configuration of SAP DB. For more information, see Installing and Configuring SAP DB. You specify this user key when you set the User_Key extension property as explained in How to Register and Configure an SAP DB Resource.

  6. Confirm that the Sun Cluster HA for SAP DB fault monitor performs the appropriate operation from the following list:

    • Restarting the SAP DB resource

    • Failing over the SAP DB resource to another node

    The expected behavior of the fault monitor depends on the failure history of the resource and the value of the Failover_enabled extension property. For more information, see the following sections:

ProcedureHow to Verify the Operation of the SAP xserver Fault Monitor

Perform this procedure on each node that can master SAP xserver.

Steps
  1. Log in to a node that can master SAP xserver.

  2. Abnormally terminate SAP xserver.

    1. Determine the process identities of all SAP xserver processes.


      # ps -ef | grep vserver
      
    2. Kill all SAP xserver processes.


      # kill -9 xserver-pid
      
      xserver-pid

      Specifies the process identities of the SAP xserver processes that you determined in Step a

  3. Confirm that the SAP xserver fault monitor restarts the SAP xserver resource.

  4. Terminate SAP xserver normally.

    1. Become the OS user who administers SAP xserver.


      # su - os-sapxsrvr-adm-user
      
      os-sapxsrvr-adm-user

      Specifies the UNIX user identity of the OS user who administers SAP xserver. By default, this user is root. You can specify this user by setting the Xserver_User extension property. For more information, see SUNW.sap_xserver Extension Properties.

    2. Manually stop the SAP xserver.


      # x_server stop
      
  5. Confirm that the SAP xserver fault monitor restarts the SAP xserver resource.

Upgrading the SUNW.sap_xserver Resource Type

The SUNW.sap_xserver resource type is supplied with the Sun Cluster HA for SAP liveCache data service. The Sun Cluster HA for SAP liveCache data service is installed when you install Sun Cluster HA for SAP DB data service. Upgrade the SUNW.sap_xserver resource type if all conditions in the following list apply:

For general instructions that explain how to upgrade a resource type, see Upgrading a Resource Type in Sun Cluster Data Services Planning and Administration Guide for Solaris OS. The information that you need to complete the upgrade of the SUNW.sap_xserver resource type is provided in the subsections that follow.

Information for Registering the New Resource Type Version

The relationship between a resource type version and the release of Sun Cluster data services is shown in the following table. The release of Sun Cluster data services indicates the release in which the version of the resource type was introduced.

Resource Type Version 

Sun ClusterData Services Release 

1.0 

3.0 5/02 asynchronous release 

3.1 4/04 

To determine the version of the resource type that is registered, use one command from the following list:

The resource type registration (RTR) file for this resource type is /opt/SUNWsclc/xserver/etc/SUNW.sap_xserver.

Information for Migrating Existing Instances of the Resource Type

The information that you need to migrate instances of the SUNW.sap_xserver resource type is as follows:

The following example shows a command for editing an instance of the SUNW.sap_xserver resource type.


Example 9 Editing an Instance of the SUNW.sap_xserver Resource Type During Upgrade


# scrgadm -cj sapxserver-rs -y Type_version=2 \
  -x Independent_Program_Path=/sapdb/indep_prog

This command edits a SUNW.sap_xserver resource as follows: