This chapter explains how to install and configure Sun Cluster HA for SAP DB.
This chapter contains the following procedures.
How to Verify SAP DB Installation and Configuration on Each Node
How to Install the Sun Cluster HA for SAP DB Packages by Using the Web Start Program
How to Install the Sun Cluster HA for SAP DB Packages by Using the scinstall Utility
How to Verify the Operation of the SAP xserver Fault Monitor
To eliminate single points of failure in an SAP DB system, Sun Cluster HA for SAP DB provides the following features:
Fault monitoring and automatic failover for the SAP DB application. You must configure Sun Cluster HA for SAP DB as a failover data service.
Fault monitoring and automatic restart for SAP xserver. You must configure SAP xserver as a scalable data service.
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.
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.
SAP DB Component |
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 Network File System (NFS) Guide for Solaris OS. |
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 1–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 | |
Verify the SAP DB installation and configuration | |
Install the Sun Cluster HA for SAP DB packages | |
Configure the HAStoragePlus resource to work with Sun Cluster HA for SAP DB |
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 | |
(Optional) Tune 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 |
This section contains the information that you need to plan your Sun Cluster HA for SAP DB installation and configuration.
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.
The configuration requirements in this section apply only to Sun Cluster HA for SAP DB.
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.
Use SAP DB version 7.4 or compatible versions.
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:
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.
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 | |
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:
Two-node cluster configuration
Four-node cluster configuration with SAP R/3
Four-node cluster configuration with SAP R/3 and SAP liveCache
Sun Cluster HA for SAP DB might support additional configurations. However, you must contact your Sun service provider for information about additional configurations.
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:
The SAP DB resource is configured as a failover data service.
The SAP xserver resource is configured as a scalable data service.
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:
The SAP APO Central Instance (CI) resource is configured as a failover data service.
The SAP DB resource is configured as a failover data service.
The SAP xserver resource is configured as a scalable data service.
APO application server (APP) resources are configured as scalable data services.
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:
The SAP APO CI resource is configured as a failover data service.
The SAP DB resource is configured as a failover data service.
The SAP xserver resource is configured as a scalable data service.
APP resources are configured as scalable data services.
The SAP liveCache resource is configured as a failover data service.
The configuration considerations in the subsections that follow affect the installation and configuration of Sun Cluster HA for SAP DB.
Ensure that you create a device group for the SAP DB application as follows:
Install SAP DB on its own global device group. For more information, see Installing and Configuring SAP DB. This separate global device group for SAP DB ensures that the SAP DB resource can depend on the HAStoragePlus resource only for SAP DB.
Create an HAStoragePlus resource for the global device group on which SAP DB is installed. For more information, see Configuring the HAStoragePlus Resource Type to Work With Sun Cluster HA for SAP DB.
Ensure that the resource for SAP DB depends on the HAStoragePlus resource for the global device group on which SAP DB is installed. For more information, see Registering and Configuring Sun Cluster HA for SAP DB.
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:
Ensure that the resource for SAP DB depends on the resource for SAP xserver.
Create on the SAP DB resource group a strong positive affinity for the SAP xserver resource group.
For more information, see Registering and Configuring Sun Cluster HA for SAP DB.
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:
You must create that user on all cluster nodes that master SAP xserver.
You must define that user when you register and configure Sun Cluster HA for SAP DB. For more information, see Registering and Configuring Sun Cluster HA for SAP DB.
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 “Configuration Worksheets” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS.
Which resource group will you use for the SAP DB application resource and for the logical hostname for the SAP DB resource?
Use the answer to this question when you perform the procedure How to Enable SAP DB to Run in a Cluster.
What is the logical hostname for the SAP DB resource? Clients access the data service through this logical hostname.
Use the answer to this question when you perform the following procedures:
Where will the system configuration files reside?
See Sun Cluster Data Services Planning and Administration Guide for Solaris OS for the advantages and disadvantages of using the local file system instead of the cluster file system.
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:
If you are using SAP DB with SAP R/3, see the SAP R/3 documentation for information about how to install and configure SAP R/3 with SAP DB.
If you are using SAP DB independently of SAP R/3, see the SAP DB documentation.
On one node of the cluster, install the SAP DB software.
Ensure that you install SAP DB on its own global device group.
Perform a standard configuration of SAP DB.
Create the .XUSER.62 file in the home directory of the operating system (OS) user who administers the SAP DB instance.
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.
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 |
Specifies the plain text file from which you are generating the .XUSER.62 file
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 - |
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.
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:
The user key that is used to address this combination of XUSER data is named DEFAULT.
The user name and password of the database user are dbm.
The name of the SAP DB instance is TST.
The logical hostname for the SAP DB resource is srvr-1.
No structured query language (SQL) mode is specified.
The default time-out value of the SAP DB instance is used.
The default isolation level of the SAP DB instance is used.
For more information, see the SAP DB documentation.
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] |
Specifies that a new configuration is to be added.
Specifies that the resource group that you are creating is named sapdb-rg.
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.
Ensure that all network resources that you intend to you use are added to your name service database.
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] |
Specifies that a new configuration is to be added.
Species that a logical hostname resource is to be added.
Specifies that the logical hostname resource is to be added to the failover resource group that you created in Step 1.
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.
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.
Enable the resource group that you created in Step 1.
# scswitch -Z -g sapdb-rg |
Moves a resource group to the MANAGED state and brings the resource group online
Specifies that the resource group that you created in Step 1 is to be moved to the MANAGED state and brought online
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.
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 |
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 |
The following command moves the sapdbrg resource group to the MANAGED state and brings the resource group online.
# scswitch -Z -g sapdbrg |
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.
Perform this procedure on each node that can master the SAP DB resource group.
Log in as superuser to a node that can master the SAP DB resource group.
Switch the SAP DB resource group to the node that you logged in to in Step 1.
# scswitch -z -g sapdb-rg -h node |
Specifies that the node that masters a resource group is to be switched
Specifies that the SAP DB resource group is to be switched to another node
Specifies the node to which the SAP DB resource group is to be switched
Confirm that the SAP DB database can be started and be stopped.
Become the OS user who administers the SAP DB database.
# su - 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.
# x_server start |
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 |
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.
Confirm that the SAP DB database instance is started.
Manually stop the SAP DB database instance.
# dbmcli -U sapdb-adm-key db_offline |
Specifies that the dbmcli command is run with the user key that you used for starting the database in Step c
Confirm that the SAP DB database instance is stopped.
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 Java Enterprise System Accessory CD Volume 3.
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:
The Web Start program
The scinstall utility
The Web Start program is not available in releases earlier than Sun Cluster 3.1 Data Services 10/03.
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:
Version 3.0 5/02 asynchronous release
Version 3.1 5/03
Version 3.1 10/03
For instructions for upgrading Sun Cluster software, see “Upgrading Sun Cluster Software” in Sun Cluster Software Installation Guide for Solaris OS.
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.
On the cluster node where you are installing the Sun Cluster HA for SAP DB packages, become superuser.
(Optional) If you intend to run the Web Start program with a GUI, ensure
that your DISPLAY
environment
variable is set.
Load the Sun Java Enterprise System Accessory CD Volume 3 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.
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 |
Start the Web Start program.
# ./installer |
When you are prompted, select the type of installation.
Follow 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.
Exit the Web Start program.
Unload the Sun Java Enterprise System Accessory CD Volume 3 from the CD-ROM drive.
Go to Configuring the HAStoragePlus Resource Type to Work With Sun Cluster HA for SAP DB.
Load the Sun Java Enterprise System Accessory CD Volume 3 into the CD-ROM drive.
Run the scinstall utility with no options.
This step starts the scinstall utility in interactive mode.
Select the menu option, Add Support for New Data Service to This Cluster Node.
The scinstall utility prompts you for additional information.
Provide the path to the Sun Java Enterprise System Accessory CD Volume 3.
The utility refers to the CD as the “data services cd.”
Specify the data service to install.
The scinstall utility lists the data service that you selected and asks you to confirm your choice.
Exit the scinstall utility.
Unload the CD from the drive.
Go to 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:
Synchronizing the startups between resource groups and disk device groups as explained in “Synchronizing the Startups Between Resource Groups and Disk Device Groups” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS
Registering and configuring an HAStoragePlus resource
Register the SUNW.HAStoragePlus resource type.
# scrgadm -a -t SUNW.HAStoragePlus |
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 |
Specifies that a new configuration is to be added.
Specifies that the resource that you are creating is named hsp-resource.
Specifies that the resource is to be added to the SAP DB resource group.
Specifies that the resource is an instance of the SUNW.HAStoragePlus resource type.
Specifies a list of valid mount points for the file system. For more information, see the SUNW.HAStoragePlus(5) man page.
Specifies the name of the global device group on which the SAP DB software is installed.
Specifies that this resource performs an affinity switchover for all global devices that are defined for this resource.
Enable the HAStoragePlus resource that you created in Step 2.
# scswitch -ej hsp-resource |
Specifies that the HAStoragePlus resource that you created in Step 2 is to be enabled
# 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:
The resource is named hsprs.
The resource is a member of a resource group that is named sapdbrg. The creation of this resource group is shown in Example 1–5.
The resource is an instance of the SUNW.HAStoragePlus resource type. The registration of this resource type is not shown in this example.
The mount point for the file system is /global/sapdbdata.
The SAP DB software is installed on a global device group that is named sapdbdg.
The hsprs resource performs an affinity switchover for all global devices that are defined for this resource.
Go to 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:
Configure SAP xserver as a scalable data service.
Configure Sun Cluster HA for SAP DB as a failover data service.
Before you perform this procedure, ensure that the Sun Cluster HA for SAP DB data service packages are installed.
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.
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 |
Identifies the extension property that you are setting
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.
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:
You must create that user on all cluster nodes that master SAP xserver.
You must define that user when you register and configure an SAP xserver resource. To define the user who administers SAP xserver, set the Xserver_User extension property when you create an SAP xserver resource. For more information about the Xserver_User extension property, see SUNW.sap_xserver Extension Properties.
Become superuser on a cluster node.
Register the SUNW.sap_xserver resource type.
# scrgadm -a -t SUNW.sap_xserver |
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 |
Specifies that a new configuration is to be added.
Specifies that the resource group that you are creating is named xserver-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.
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.
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.
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 |
Specifies that a new configuration is to be added
Specifies that the resource that you are creating is named xserver-resource
Specifies that the resource is to be added to the resource group that you created in Step 3
Specifies that the resource is an instance of the SUNW.sap_xserver resource type
Enable the resource group that you created in Step 3.
# scswitch -Z -g xserver-rg |
Moves a resource group to the MANAGED state and brings the resource group online
Specifies that the resource group that you created in Step 3 is to be moved to the MANAGED state and brought online
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.
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 |
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 |
The following command moves the xsrvrrg resource group to the MANAGED state and brings the resource group online.
# scswitch -Z -g |
Register the SUNW.sapdb resource type.
# scrgadm -a -t SUNW.sapdb |
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 |
Specifies that a new configuration is to be added.
Specifies that the resource that you are creating is named sapdb-rs.
Specifies that the resource is to be added to the SAP DB resource group.
Specifies that the resource is an instance of the SUNW.sapdb resource type.
Specifies the name of the SAP DB database instance in uppercase.
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.
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.
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
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 |
Specifies that an existing configuration is to be modified
Specifies that the SAP DB resource group is to be modified
Specifies that the SAP DB resource group declares a strong positive affinity for the SAP xserver resource group
Enable the SAP DB resource group.
# scswitch -Z -g sapdb-rg |
Moves a resource group to the MANAGED state and brings the resource group online
Specifies that the SAP DB resource group is to be moved to the MANAGED state and brought online
(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 |
Specifies that an existing configuration is to be modified
Specifies that the resource group for a noncritical service is to be modified
Specifies that the resource group for a noncritical service declares a strong negative affinity for the SAP DB resource group
# 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:
The resource is named sapdbrs.
The resource is a member of a resource group that is named sapdbrg. The creation of this resource group is shown in Example 1–5.
The resource is an instance of the SUNW.sapdb resource type. The registration of this resource type is not shown in this example.
The SAP DB database instance that is associated with this resource is named TST.
The UNIX user identity of the OS user who administers the SAP DB database is dbadmin.
The user key of the database user who administers the SAP DB database is DEFAULT.
The SAP DB resource depends on the following resources:
An HAStoragePlus resource that is named hsprs. The creation of the hsprs resource is shown in Example 1–6.
A SUNW.sap_xserver resource that is named xsrvrrs. The creation of the xsrvrrs resource is shown in Example 1–7.
Fault monitoring for the Sun Cluster HA for SAP DB data service is provided by the following fault monitors:
The SAP DB fault monitor
The SAP xserver fault monitor
Each fault monitor is contained in a resource whose resource type is shown in the following table.
Table 1–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:
Setting the interval between fault monitor probes
Setting the timeout for fault monitor probes
Defining the criteria for persistent faults
Specifying the failover behavior of a resource
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.
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.
The optimum timeout for fault monitor probes depends on the operations that a fault monitor performs to probe the resource.
During a probe, the SAP DB fault monitor performs the following operations:
The SAP DB fault monitor determines whether the SAP DB database instance is online.
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.
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.
During a probe, the SAP xserver fault monitor determines whether SAP xserver is available.
Faults that each Sun Cluster HA for SAP DB fault monitor detects are described in the subsections that follow.
The SAP DB fault monitor detects the following faults in SAP DB:
A status of the SAP DB database instance that is not ONLINE, for example, OFFLINE or ADMIN
Unexpected termination of the parent kernel process of the SAP DB database instance
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.
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.
The SAP xserver fault monitor detects following faults:
Unavailability of SAP xserver. Unavailability of SAP xserver is also detected by the SAP DB fault monitor.
Persistent system errors. A persistent system error is a system error that occurs four times within the retry interval. If a persistent system error occurs, the fault monitor restarts SAP xserver.
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:
For the SAP DB resource, the fault monitor fails over the resource to another node. The SAP DB resource is a failover resource.
For the SAP xserver resource, the fault monitor takes the resource offline. The SAP xserver is a scalable resource.
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.
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:
The SAP DB fault monitor
The SAP xserver fault monitor
Perform this procedure on each node where SAP DB can run.
Log in as superuser to a node that can master the SAP DB resource group.
Switch the SAP DB resource group to the node that you logged in to in Step 1.
# scswitch -z -g sapdb-rg -h node |
Specifies that the node that masters a resource group is to be switched
Specifies that the SAP DB resource group is to be switched to another node
Specifies the node to which the SAP DB resource group is to be switched
Abnormally terminate SAP DB.
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 |
Specifies the name of the SAP DB database instance in uppercase
Kill all kernel processes for the SAP DB database instance that you are running.
# kill -9 sapdb-kernel-pid |
Specifies the process identities of the SAP DB kernel processes that you determined in Step a
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:
Terminate SAP DB normally.
Become the OS user who administers the SAP DB database.
# su - 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.
Manually stop the SAP DB database instance.
# dbmcli -U sapdb-adm-key db_offline |
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.
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:
Perform this procedure on each node that can master SAP xserver.
Log in to a node that can master SAP xserver.
Abnormally terminate SAP xserver.
Determine the process identities of all SAP xserver processes.
# ps -ef | grep vserver |
Kill all SAP xserver processes.
# kill -9 xserver-pid |
Specifies the process identities of the SAP xserver processes that you determined in Step a
Confirm that the SAP xserver fault monitor restarts the SAP xserver resource.
Terminate SAP xserver normally.
Become the OS user who administers SAP xserver.
# su - 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.
Manually stop the SAP xserver.
# x_server stop |
Confirm that the SAP xserver fault monitor restarts the SAP xserver resource.
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:
You are using version 3.0 5/02 asynchronous release, version 3.1 5/03, or version 3.1 10/03 of the Sun Cluster HA for SAP liveCache data service.
You plan to use the Sun Cluster HA for SAP DB data service with your existing version of the Sun Cluster HA for SAP liveCache data service.
You need to use the new features of the SUNW.sap_xserver resource type.
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.
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 Cluster Data Services Release |
---|---|
1.0 |
3.0 5/02 asynchronous release |
2 |
3.1 4/04 |
To determine the version of the resource type that is registered, use one command from the following list:
scrgadm -p
scrgadm -pv
The resource type registration (RTR) file for this resource type is /opt/SUNWsclc/xserver/etc/SUNW.sap_xserver.
The information that you need to migrate instances of the SUNW.sap_xserver resource type is as follows:
You can perform the migration only when the resource is unmonitored.
If you need to use the new features of the SUNW.sap_xserver resource type, the required value of the Type_version property is 2.
If you need to specify the directory that contains programs and libraries for the SAP xserver runtime environment, set the Independent_Program_Path extension property. For more information, see SUNW.sap_xserver Extension Properties.
The following example shows a command for editing an instance of the SUNW.sap_xserver resource type.
# 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:
The SUNW.sap_xserver resource is named sapxserver-rs.
The Type_version property of this resource is set to 2.
The independent program path is /sapdb/indep_prog.