Sun Cluster Data Service for SAP DB Guide for Solaris OS

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 “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:

How to Register and Configure an SAP xserver Resource

  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

  6. Modify the SAP DB resource group to depend on the resource group that you created in Step 3.


    # scrgadm -c -g sapdb-rg -y rg_dependencies=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_dependencies=xserver-rg

    Specifies that the SAP DB resource group is to depend on the resource group that you created in Step 3


Example 1–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 
    
  4. The following command modifies the sapdbrg resource group to depend on the xsrvrrg resource group. The creation of the sapdbrg resource group is shown in Example 1–5.


    # scrgadm -c -g sapdbrg -y rg_dependencies=xsrvrrg
    

How to Register and Configure an SAP DB Resource

  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 HAStoragePlus resource for the global device group on which SAP DB is installed.

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

    Specifies that the SAP DB resource depends on the HAStoragePlus resource for the global device group on which SAP DB is installed.

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

  4. (Optional) Consider configuring your cluster to offload noncritical resource groups.

    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 an RGOffload resource to shut down those services when the SAP DB resource fails over to the node. For more information, see “Freeing Node Resources by Offloading Non-critical Resource Groups” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.


Example 1–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

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