Sun Cluster Data Service for MaxDB Guide for Solaris OS

ProcedureHow to Register and Configure a MaxDB Resource

  1. Register the SUNW.sapdb resource type.


    # clresourcetype register SUNW.sapdb
    
  2. Create a MaxDB resource in the MaxDB resource group.

    Ensure that the MaxDB resource depends on the following resources:

    • The HAStoragePlus resource for the global device group on which MaxDB is installed.

    • The SAP xserver resource.

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

    • The name of the MaxDB database.

    • The UNIX user identity of the OS user who administers the MaxDB database instance. If you are using MaxDB 7.5 or MaxDB 7.6, the UNIX user identity of the OS user who administers the MaxDB database is sdb.

    • The user key of the database user who administers the MaxDB database instance.


    # clresource create -d -g sapdb-rg \
    -t SUNW.sapdb \
    -p DB_Name=db-name \
    -p DB_User=os-sapdb-adm-user \
    -p User_Key=sapdb-adm-key \
    -p resource_dependencies=hsp-resource,xserver-resource sapdb-rs
    
    -d

    Specifies that the resource that you are creating is not immediately enabled.

    -g sapdb-rg

    Specifies that the resource is to be added to the MaxDB resource group.

    -t SUNW.sapdb

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

    -p DB_Name=db-name

    Specifies the name of the MaxDB database instance in uppercase.

    -p DB_User=os-sapdb-adm-user

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

    -p User_Key=sapdb-adm-key

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

    -p resource_dependencies=hsp-resource,xserver-resource

    Specifies that the MaxDB resource depends on the following resources.

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

    • The SAP xserver resource

    sapdb-rs

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

    The resource is created in the enabled state.

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

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


    # clresourcegroup set -p rg_affinities=++xserver-rg sapdb-rg
    
    -p rg_affinities=++xserver-rg

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

    sapdb-rg

    Specifies that theMaxDB resource group is to be modified.

  4. Enable the MaxDB resource group.


    #clresourcegroup online -emM sapdb-rg
    
    -emM

    Enables the MaxDB resource group and moves it to the MANAGED state.

    sapdb-rg

    Specifies the name of the MaxDB resource group to be brought online.

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

    You might plan to run lower-priority services on a node to which the MaxDB resource can fail over. In this situation, consider using resource group affinities to shut down the noncritical services when the MaxDB 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 MaxDB resource group.


    # clresourcegroup set -p rg_affinities=--sapdb-rg noncritical-rg
    
    -p

    Sets the resource group property to the specified value.

    noncritical-rg

    Specifies the name of the noncritical resource group.


Example 8 Creating a SUNW.sapdb Resource


# clresource create -d -g sapdbrg -t SUNW.sapdb \
-p DB_Name=TST -p DB_User=dbadmin \
-p User_Key=DEFAULT -p resource_dependencies=hsprs,xsrvrrs sapdbrs

The resource is created in the enabled state.

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