Sun Cluster Data Service for SAP DB Guide for Solaris OS

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

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