Sun Cluster Data Service for SAP DB 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 hostname. To enable SAP DB to run in a cluster, you must modify SAP DB to use a logical hostname.

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

How to Install and Configure SAP DB

  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 hostname for the SAP DB resource that you specified in Configuration Planning Questions.

      For an example of the content of this file, see Example 1–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) command.


    # 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 1–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.


How to Enable SAP DB to Run in a Cluster

  1. Create a failover resource group to contain the SAP DB application resources and the logical hostname 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 hostname 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 hostname resource is to be added.

    -g sapdb-rg

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

    -l sapdb-logical-hostname

    Specifies the logical hostname of the server on which the database is running. This hostname must be the logical hostname 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 hostname 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 1–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 hostname 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 hostname resource to the sapdbrg resource group. The logical hostname 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 hostname 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