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) |
“Cluster Administration and Application Development” 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 only on the HAStoragePlus resource 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 Sun Cluster HA 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.
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
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 |
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 is to depend on the resource group that you created in Step 3
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 |
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 |
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 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 |
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 HAStoragePlus resource for the global device group on which SAP DB is installed.
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 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.
# 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:
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 an HAStoragePlus resource that is named hsprs. The creation of the hsprs resource is shown in Example 1–6.
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
Specifying the response to a fault
Perform these tasks 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.
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.
The SAP DB fault monitor responds to 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 responds to the unavailability of SAP xserver. This fault monitoring supplements the fault monitoring that the SAP xserver fault monitor provides.
The SAP xserver fault monitor responds to following faults:
Unavailability of SAP xserver
Persistent system errors
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 interval between fault monitor probes affects the availability of each resource and the performance of your system as follows:
The interval between fault monitor probes affects the length of time that is required to detect a fault and respond to the fault. Therefore, if you decrease the interval between fault monitor probes, the time that is required to detect a fault and respond to the fault is also decreased. This decrease enhances the availability of the resource.
Each fault monitor probe consumes system resources such as processor cycles and memory. Therefore, if you decrease the interval between fault monitor probes, the performance of the system is degraded.
The optimum interval between fault monitor probes also depends on the time that is required to respond to a fault in the 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.
To set the interval between fault monitor probes, set the Thorough_probe_interval system property to the interval in seconds that you require. Set this property for each resource that contains a Sun Cluster HA for SAP DB fault monitor that you need to tune. The resource types of these resources are shown in Table 1–3.
The timeout for fault monitor probes specifies the length of time that a fault monitor waits for a response from a resource to a probe. If the fault monitor does not receive a response within this timeout, the fault monitor treats the resource as faulty. The time that a resource requires to respond to a fault monitor probe depends on the operations that the 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.
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.
The time that is required for a resource to respond also depends on factors that are unrelated to the fault monitor or the application, for example:
System configuration
Cluster configuration
System load
Amount of network traffic
To set the timeout for fault monitor probes, set the Probe_timeout extension property to the timeout in seconds that you require. Set this property for each resource that contains a Sun Cluster HA for SAP DB fault monitor that you need to tune. The resource types of these resources are shown in Table 1–3.
The SAP DB fault monitor responds to 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 responds to the unavailability of SAP xserver. This fault monitoring supplements the fault monitoring that the SAP xserver fault monitor provides.
The SAP xserver fault monitor responds to following faults:
Unavailability of SAP xserver
Persistent system errors
The Sun Cluster HA for SAP DB fault monitors enable you to specify the response to these faults. Specifying the response to a fault involves the following tasks:
Defining the criteria for persistent faults
Disabling the failover of the SAP DB resource
Forcing the SAP DB database instance to be restarted if the parent kernel process is terminated
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.
The fault monitors treat a fault as persistent if the number of attempts to restart a resource exceeds a specified threshold within a specified retry interval. Defining the criteria for persistent faults enables you to set the threshold and the retry interval to accommodate the performance characteristics of your cluster and your availability requirements.
The maximum length of time that is required for a single restart of a faulty resource is the sum of the values of the following properties:
Thorough_probe_interval system property
Probe_timeout extension property
To ensure that you allow enough time for the threshold to be reached within the retry interval, use the following expression to calculate values for the retry interval and the threshold:
retry-interval ≥ threshold × (thorough-probe-interval + probe-timeout)
To set the threshold and the retry interval, set the following system properties:
To set the threshold, set the Retry_count system property to the maximum allowed number of restarts.
To set the retry interval, set the Retry_interval system property to the interval in seconds that you require.
Set these properties for each resource that contains a Sun Cluster HA for SAP DB fault monitor that you need to tune. The resource types of these resources are shown in Table 1–3.
Besides defining a criterion for persistent faults, the retry interval affects the response of a fault monitor to the following faults:
Unavailability of SAP xserver that the SAP DB fault monitor detects. If the SAP DB fault monitor detects that SAP xserver is unavailable twice within the retry interval, the SAP DB fault monitor restarts SAP xserver.
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.
By default, failover of the SAP DB resource is enabled. The fault monitor fails over the SAP DB resource in response to a persistent fault. A persistent fault occurs if the number of attempts to restart exceeds Retry_count within the time that Retry_interval specifies.
Disable the failover of the SAP DB resource if you require the fault monitor to restart the SAP DB even in response to a persistent fault. When failover is disabled, the fault monitor reports a persistent fault in a resource by setting the status of the resource to faulted.
To disable the failover of the SAP DB resource, set the Failover_enabled extension property of the SUNW.sapdb resource to False.
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 Defining the Criteria for Persistent Faults and Forcing the SAP DB Database Instance to Be Restarted if the Parent Kernel Process Is Terminated.
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 Defining the Criteria for Persistent Faults and Forcing the SAP DB Database Instance to Be Restarted if the Parent Kernel Process Is Terminated.
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.