This chapter provides instructions on how to plan, set up, and configure Sun Cluster HA for SAP on your Sun Cluster nodes.
This chapter includes the following procedures.
"How to Verify SAP and Database Installation With Central Instance"
"How to Verify SAP and Database Installation With Application Server"
"How to Register and Configure Sun Cluster HA for SAP With Central Instance"
"How to Register and Configure Sun Cluster HA for SAP With Application Server"
"How to Verify the Sun Cluster HA for SAP Installation With Central Instance"
"How to Verify the Sun Cluster HA for SAP Installation With Application Server"
The following table lists the sections that describe the installation and configuration tasks.
Table 9-1 Task Map: Installing and Configuring Sun Cluster HA for SAP
Task |
For Instructions, Go To |
---|---|
Plan the SAP installation |
"Sun Cluster HA for SAP Overview" |
Install and configure SAP and the database |
"How to Install SAP and the Database" "How to Enable SAP to Run in the Cluster" "How to Verify SAP and Database Installation With Central Instance" "How to Verify SAP and Database Installation With Application Server" |
Configure the Sun Cluster HA for DBMS | |
Configure Sun Cluster HA for SAP |
"How to Register and Configure Sun Cluster HA for SAP With Central Instance" "How to Register and Configure Sun Cluster HA for SAP With Application Server" "How to Verify the Sun Cluster HA for SAP Installation With Central Instance" "How to Verify the Sun Cluster HA for SAP Installation With Application Server" |
Configure SAP extension properties | |
View Sun Cluster HA for SAP fault monitor information |
Sun Cluster HA for SAP provides fault monitoring and automatic failover for the SAP application to eliminate single points of failure in an SAP system. The following table lists the data services that best protect SAP components in a Sun Cluster configuration.
Table 9-2 Protection of SAP Components
SAP Component |
Protected by |
---|---|
SAP database |
Sun Cluster HA for Oracle, if the database is Oracle |
SAP central instance |
Sun Cluster HA for SAP, the resource type is SUNW.sap_ci |
SAP application server |
Sun Cluster HA for SAP, the resource type is SUNW.sap_as |
NFS file system |
Sun Cluster HA for NFS |
Use the scinstall(1M) command to install Sun Cluster HA for SAP. Sun Cluster HA for SAP requires a functioning cluster with the initial cluster framework already installed. See the Sun Cluster 3.0 12/01 Software Installation Guide for details about initial installation of clusters and data services. Register Sun Cluster HA for SAP after you successfully install the basic components of the Sun Cluster and SAP software.
When you design a Sun Cluster HA for SAP configuration, consider the following guidelines.
Use an SAP software version that is qualified with Sun Cluster 3.0 - The Solaris 8 operating environment offers support for the Sun Cluster software.
Use an SAP software version with automatic enqueue reconnect mechanism capability - Sun Cluster HA for SAP relies on this capability. SAP 4.0 software with patch information and later releases should have automatic enqueue reconnect mechanism capability.
Read all of the related SAP online service system notes for the SAP software release and database that you are installing on your Solaris platform - Identify any known installation problems and fixes.
Consult SAP software documentation for memory and swap recommendations - SAP software uses a large amount of memory and swap space.
Generously estimate the total possible load on nodes that might host the central instance, the database instance, and the application server, if you have an internal application server - This guideline is especially important if you configure the cluster so that the central instance, database instance, and application server will all exist on one node if failover occurs.
Install application servers on the same cluster that hosts the central instance or on a separate cluster - If you install and configure any application server outside of the cluster environment, Sun Cluster HA for SAP does not fault monitor and does not automatically restart or fail over those application servers. You must manually start and shut down application servers that you installed and configured outside of the cluster environment.
Limit node names and network resource names to eight characters or less - This limitation is an SAP software requirement.
See your Enterprise Services representative for the most current information about supported SAP versions. The following figures illustrate sample configurations for Sun Cluster HA for SAP.
This figure was a common configuration under previous Sun Cluster releases. To use the Sun Cluster 3.0 software to the full extent, follow Figure 9-1 or Figure 9-3.
Before you install the SAP software, see "Installing and Configuring SAP and the Database", and consider the following cluster-related issues.
Install SAP binaries and SAP users' home directories - Install SAP binaries and users' home directories on the cluster file system. Installation on the cluster file system, however, has some drawbacks with SAP software release upgrades. See "Determining the Location of the Application Binaries" for information about drawbacks.
After you create all of the file systems for the database and for SAP, create the mount points, and put the mount points in the /etc/vfstab file on all of the cluster nodes - See the SAP installation guides, Installation of the SAP R/3 on UNIX and R/3 Installation on UNIX-OS Dependencies, for details on how to set up the database and SAP file systems.
Create the required groups and users on all of the cluster nodes - Create the required groups and users for the SAP software on all of the cluster nodes according to the SAP installation guides, Installation of the SAP R/3 on UNIX and R/3 Installation on UNIX-OS Dependencies.
Configure Sun Cluster HA for NFS on the cluster that hosts the central instance if you plan to install some external SAP application servers - See "Installing and Configuring Sun Cluster HA for NFS" for details on how to configure Sun Cluster HA for NFS.
Set up the /etc/nsswitch.conf file so that the data service starts and stops correctly during switchovers or failovers - On each node that can master the logical host that runs Sun Cluster HA for SAP, the /etc/nsswitch.conf file must have one of the following entries for group.
group: group: files group: files [NOTFOUND=return] nis group: files [NOTFOUND=return] nisplus |
Sun Cluster HA for SAP uses the su user command to start and stop the database node. The network information name service might become unavailable when a cluster node's public network fails. Adding the preceding entries for group ensures that the su(1M) command does not refer to the NIS/NIS+ name services if this unavailability occurs.
Use the procedures in this section to perform the following tasks.
Install SAP and the database.
Enable SAP to run in the cluster.
Verify SAP and database installation.
This section describes how to install and configure SAP and the database and how to enable SAP to run in the cluster.
Become superuser on one of the nodes in the cluster where you are installing the central instance.
Install SAP binaries on the cluster file system.
Before you install SAP software on the cluster file system, use the scstat(1M) command to verify that the Sun Cluster software is fully operational.
For all of the SAP-required kernel parameter changes, edit the /etc/system file on all of the cluster nodes that will run the SAP application.
After you edit the /etc/system file, reboot each node. See the SAP document R/3 Installation on UNIX-OS Dependencies for details on kernel parameter changes.
See the SAP document Installation of the SAP R/3 on UNIX for details on how to install the central instance and the database.
During SAP installation, the SAP software creates files and shell scripts on the server on which you installed the SAP central instance. These files and scripts use physical server names. To run the SAP software with Sun Cluster software, replace references to a physical server with references to a network resource (logical hostname or shared address). Throughout these steps, the replaceable term physicalserver represents a physical server, and the replaceable term logical-hostname represents a network resource.
Perform the following steps to enable SAP to run in the cluster.
Make backup copies of the files that you will modify in the following steps.
Log in to the node on which you installed the SAP software.
Shut down the SAP central instance and the database.
In addition to the central instance and database, shut down any application servers that are running.
Modify all of the file names that include a physical server name in the following directories.
The sapsidadm home directory - Become the sapsidadm user before you edit these files.
The orasapsid home directory - Become the orasapsid user before you edit these files.
SAP profile directory - Become the sapsidadm user before you edit these files.
For example, rename the .sapenv_physicalserver.csh file as .sapenv.csh.
Modify all of the file contents-except log file contents-that reference a physical server name in the following directories.
The sapsidadm home directory - Become the sapsidadm user before you edit these files.
The orasapsid home directory - Become the orasapsid user before you edit these files.
SAP profile directory - Become the sapsidadm user before you edit these files.
For example, change any physicalserver reference in the startup and shutdown scripts to a logical hostname reference.
As user sapsidadm, add an entry such as the following example for the parameter SAPLOCALHOST.
SAPLOCALHOST=logical-hostname |
Add this entry to the SAPSID_Service-StringSystem-Number_logical-hostname profile file under the /sapmnt/SAPSID/profile directory.
This entry enables the external application server to locate the central instance by using the network resource (logical hostname or shared address).
Perform this procedure to test starting and stopping the SAP central instance on all of the potential nodes on which the central instance can run.
Create the failover resource group to hold the network and central instance resources.
# scrgadm -a -g sap-ci-resource-group |
You can optionally select the set of nodes on which the SAP central instance can run with the -h option to the scrgadm(1M) command.
# scrgadm -a -g sap-ci-resource-group [-h nodelist] |
Verify that you have added all of the network resources that you use to your name service database.
Run the scrgadm command to add a network resource (logical hostname or shared address) to the failover resource group.
# scrgadm -a -L -g sap-ci-resource-group -l logical-hostname [-n nafo0@node1,nafo0@node2] |
Enable the resource group.
Run the scswitch(1M) command to move the resource group into a managed state and bring the resource group online.
# scswitch -Z -g sap-ci-resource-group |
Log in to the cluster member that hosts the central instance resource group.
Start the central instance and the database.
Start the SAP GUI to verify that SAP initializes correctly.
The default dispatcher port is 3200.
Stop the central instance and the database.
Run the scswitch command.
In the following example, the replaceable term sap-ci-resource-group represents the resource group that contains the network resource (logical hostname or shared address) for the central instance resource. Switch this resource group to another cluster member that can host the central instance.
# scswitch -z -h node -g sap-ci-resource-group |
Repeat Step 5 through Step 7 until you verify startup and shutdown of the central instance on each cluster node that can host the central instance.
If you have installed and configured any application servers, perform this procedure on all of the potential nodes on which the application server can run. This procedure tests starting and stopping the application server.
Create the failover resource group to hold the network and application server resources.
# scrgadm -a -g sap-as-resource-group |
You can optionally select the set of nodes on which the SAP application server can run with the -h option to the scrgadm command.
# scrgadm -a -g sap-as-resource-group [-h nodelist] |
Verify that you have added all of the network resources that you use to your name service database.
Run the scrgadm command to add a network resource (logical hostname or shared address) to the failover resource group.
# scrgadm -a -L -g sap-as-resource-group -l logical-hostname [-n nafo0@node1,nafo0@node2] |
Enable the resource group.
Run the scswitch(1M) command to move the resource group into a managed state and bring the resource group online.
# scswitch -Z -g sap-as-resource-group |
Log in to the cluster member that hosts the application server resource group.
Start the application server.
Start the SAP GUI to verify that the SAP application server initializes correctly.
Stop the application server.
Run the scswitch command.
In the following example, the term sap-as-resource-group represents the resource group that contains the network resource (logical hostname or shared address) for the application server resource. Switch this resource group to another cluster member that can host the application server.
# scswitch -z -h node -g sap-as-resource-group |
Repeat Step 5 through Step 7 until you verify startup and shutdown of the application server on each cluster node that can host the application server.
After you finish all of the procedures to install and configure SAP and the database, go to "How to Register and Configure Sun Cluster HA for SAP With Central Instance".
SAP supports various databases. See the appropriate chapter of this book for details on how to configure the resource type, resource group, and resource for your highly available database. For example, see "Installing and Configuring Sun Cluster HA for Oracle" for more information if you plan to use Oracle with SAP.
Additionally, see the appropriate chapter of this book and the appropriate chapter of your database installation book for details on other resource types to configure with your database. This book includes details on how to configure other resource types for Oracle databases. For instance, set up the resource type SUNW.HAStorage if you use Oracle. See the procedure "How to Configure SUNW.HAStorage Resource Type" for more information.
Use the procedures in this section to perform the following tasks.
Register and configure Sun Cluster HA for SAP.
Verify the Sun Cluster HA for SAP installation.
To register and configure Sun Cluster HA for SAP with a central instance, perform the following steps.
Become superuser on one of the nodes in the cluster that hosts the central instance.
Register the resource type for the SAP data service.
For central instance, run the scrgadm command to register the resource type SUNW.sap_ci.
# scrgadm -a -t SUNW.sap_ci |
Run the scrgadm command to create SAP application resources in this failover resource group.
# scrgadm -a -j sap-ci-resource -g sap-ci-resource-group -t SUNW.sap_ci -x SAPSID=SAPSID -x Ci_startup_script=ci-startup-script -x Ci_shutdown_script=ci-shutdown-script |
Run the scswitch command to enable the resource group that now includes the SAP central instance resource.
# scswitch -Z -g sap-ci-resource-group |
To register and configure Sun Cluster HA for SAP with an application server, perform the following steps.
Become superuser on one of the nodes in the cluster that hosts the application server.
Register the resource type for the SAP data server.
For application server, run the scrgadm command to register the resource type SUNW.sap_as.
# scrgadm -a -t SUNW.sap_as |
Run the scrgadm command to create SAP application server resources in this failover resource group.
# scrgadm -a -j sap-as-resource -g sap-as-resource-group -t SUNW.sap_as -x SAPSID=SAPSID -x As_instance_id=as-instance-id -x As_startup_script=as-startup-script -x As_shutdown_script=as-shutdown-script |
Run the scswitch command to enable the resource group that now includes the SAP application server resource.
# scswitch -Z -g sap-as-resource-group |
Perform the following steps to verify both the Sun Cluster HA for SAP installation with a central instance and the Sun Cluster HA for DBMS installation and configuration.
Log in to the node that hosts the resource group that contains the SAP central instance resource.
Become user sapsidadm.
Start the SAP GUI to check that Sun Cluster HA for SAP is functioning correctly.
Use the central instance stopsap script to shut down the SAP central instance.
The Sun Cluster software should restart the central instance because the Sun Cluster software controls the SAP software.
Run the scswitch command to switch the SAP resource group to another cluster member.
# scswitch -z -h node2 -g sap-ci-resource-group |
Verify that the SAP central instance starts on this node.
Repeat Step 1 through Step 6 until you have tested all of the potential nodes on which the SAP central instance can run.
If you have installed and configured any SAP application servers, perform the following steps to verify the Sun Cluster HA for SAP installation and configuration with application servers.
Log in to the node that currently hosts the resource group that contains the SAP application server resource.
Become user sapsidadm.
Start the SAP GUI to check that Sun Cluster HA for SAP is functioning correctly.
Use the application server stopsap script to shut down the SAP application server.
The Sun Cluster software should restart the application server because the Sun Cluster software controls the SAP software.
Run the scswitch command to switch the resource group that contains the SAP application server resource to another cluster member.
# scswitch -z -h node2 -g sap-as-resource-group |
Verify that the SAP application server starts on this node.
Repeat Step 1 through Step 6 until you have tested all of the potential nodes on which the SAP application server can run.
This section describes how to configure Sun Cluster HA for SAP extension properties for the central instance and application servers. Typically, you use the command line scrgadm -x parameter=value to configure the extension properties when you create the central instance or application resource. You can also use the procedures described in Chapter 13, Administering Data Service Resources to configure them later.
See the r_properties(5) and the rg_properties(5) man pages for details on all of the Sun Cluster extension properties.
Table 9-3 describes SAP extension properties that you can set for the central instance. You can update some extension properties dynamically. You can update others, however, only when you create or disable the SAP resource. The Tunable entries indicate when you can update each property.
Table 9-3 Sun Cluster HA for SAP Extension Properties for Central Instance
Property Category |
Property Name |
Description |
---|---|---|
SAP Configuration
|
SAPSID |
SAP system name or SAPSID. Default: None Tunable: When disabled |
Ci_instance_id |
Two-digit SAP system number. Default: 00 Tunable: When disabled |
|
Ci_services_string |
String of central instance services. Default: DVEBMGS Tunable: When disabled
|
|
Starting SAP
|
Ci_start_retry_ interval |
The interval in seconds to wait between attempting to connect to the database before starting the central instance. Default: 30 Tunable: When disabled |
Ci_startup_script |
Name of the SAP startup script for this instance in your SIDadm home directory. Default: None Tunable: When disabled |
|
Stopping SAP
|
Stop_sap_pct |
Percentage of stop-timeout variables that are used to stop SAP processes. The SAP shutdown script is used to stop processes before calling Process Monitor Facility (PMF) to terminate and then kill the processes. Default: 95 Tunable: When disabled |
Ci_shutdown_script |
Name of the SAP shutdown script for this instance in your SIDadm home directory. Default: None Tunable: When disabled |
|
Probe |
Message_server_name |
The name of the SAP message server.
Default: sapmsSAPSID Tunable: When disabled |
Lgtst_ms_with_ logicalhostname |
How to check the SAP message server with the SAP lgtst utility. The lgtst utility requires a hostname (IP address) as the location for the SAP message server. This hostname can be either a Sun Cluster logical hostname or a localhost (loopback) name. If you set this resource property to TRUE, use a logical hostname. Otherwise, use a localhost name.
Default: TRUE Tunable: Any time |
|
Check_ms_retry |
Maximum number of times the SAP message server check fails before a total failure is reported and the Resource Group Manager (RGM) starts.
Default: 2 Tunable: When disabled |
|
Probe_timeout |
Time-out value in seconds for the probes.
Default: 60 Tunable: Any time |
|
Monitor_retry_count |
Number of PMF restarts that are allowed for the fault monitor.
Default: 4 Tunable: Any time |
|
Monitor_retry_ interval |
Time interval in minutes for fault monitor restarts.
Default: 2 Tunable: Any time |
|
Development System
|
Shutdown_dev |
Whether the RGM should shut down the development system before starting up the central instance.
Default: FALSE Tunable: When disabled |
Dev_sapsid |
SAP System Name for the development system (if you set Shutdown_dev to TRUE, Sun Cluster HA for SAP requires this property).
Default: None Tunable: When disabled |
|
Dev_shutdown_script |
Script that is used to shut down the development system. If you set Shutdown_dev to TRUE, Sun Cluster HA for SAP requires this property.
Default: None Tunable: When disabled |
|
Dev_stop_pct |
Percentage of startup timeouts Sun Cluster HA for SAP uses to shut down the development system before starting the central instance.
Default: 20 Tunable: When disabled |
The following table describes extension properties that you can set for SAP with application servers.
Table 9-4 Sun Cluster HA for SAP Extension Properties for Application Server
Property Category |
Property Name |
Description |
---|---|---|
SAP Configuration
|
SAPSID |
SAP system name or SAPSID for the application server.
Default: None Tunable: When disabled |
As_instance_id |
Two-digit SAP system number for the application server.
Default: None Tunable: When disabled |
|
As_services_string |
String of application server services.
Default: D Tunable: When disabled |
|
Starting SAP
|
As_db_retry_interval |
The interval in seconds to wait between attempting to connect to the database and starting the application server.
Default: 30 Tunable: When disabled |
As_startup_script |
Name of the SAP startup script for the application server.
Default: None Tunable: When disabled |
|
Stopping SAP
|
Stop_sap_pct |
Percentage of stop-timeout variables that are used to stop SAP processes. The SAP shutdown script is used to stop processes before calling Process Monitor Facility (PMF) to terminate and then kill the processes.
Default: 95 Tunable: When disabled |
As_shutdown_script |
Name of the SAP shutdown script for the application server.
Default: None Tunable: When disabled |
|
Probe |
Probe_timeout |
Time-out value in seconds for the probes.
Default: 60 Tunable: Any time |
Monitor_retry_count |
Number of PMF restarts that the probe allows for the fault monitor.
Default: 4 Tunable: Any time |
|
Monitor_retry_ interval |
Time interval in minutes for fault monitor restarts.
Default: 2 Tunable: Any time |
The Sun Cluster HA for SAP fault monitor checks SAP process and database health. SAP process health impacts SAP resources' failure history. SAP resources' failure history in turn drives the fault monitor's actions, which include no action, restart, or failover.
In contrast to SAP process health, the health of the database SAP uses has no impact on SAP resources' failure history. Database health does, however, trigger the SAP fault monitor to log any syslog messages and to set the status accordingly for the SAP resource that uses the database.
For the central instance, the fault probe executes the following steps.
Retrieves the process IDs for the Message Server and the dispatcher.
Loops infinitely (sleeps for Thorough_probe_interval).
Checks the health of the SAP resources.
Abnormal exit - If the PMF detects that the SAP process tree has failed, the fault monitor treats this problem as a complete failure. The fault monitor restarts or fails over the SAP resource to another node based on the resources' failure history.
Health check of the SAP resources through probe - The probe uses the ps(1) command to check the SAP Message Server and main dispatcher processes. If any of the SAP Message Server or main dispatcher processes are missing from the system's active processes list, the fault monitor treats this problem as a complete failure.
If you configure the parameter Check_ms_retry to have a value greater than zero, the probe checks the Message Server connection. If you have set the extension property Lgtst_ms_with_logicalhostname to its default value TRUE, the probe completes the Message Server connection test with the utility lgtst. The probe uses the logical hostname interface that is specified in the SAP resource group to call the SAP-supplied utility lgtst. If you set the extension property Lgtst_ms_with_logicalhostname to a value other than TRUE, the probe calls lgtst with the node's localhost name (loopback interface).
If the lgtst utility call fails, the SAP Message Server connection is not functioning. In this situation, the fault monitor considers the problem to be a partial failure and does not trigger an SAP restart or a failover immediately. The fault monitor counts two partial failures as a complete failure if the following conditions occur.
You configure the extension property Check_ms_retry to be 2.
The fault monitor accumulates two partial failures that happen within the retry interval that the resource property Retry_interval sets.
A complete failure triggers either a local restart or a failover, based on the resource's failure history.
Database connection status through probe - The probe calls the SAP-supplied utility R3trans to check the status of the database connection. Sun Cluster HA for SAP fault probes verify that SAP can connect to the database. Sun Cluster HA for SAP depends, however, on the highly available database fault probes to determine the health of the database. If the database connection status check fails, the fault monitor logs the message, "Database might be down," to syslog. The fault monitor then sets the status of the SAP resource to DEGRADED. If the probe checks the status of the database again and the connection is reestablished, the fault monitor logs the message, "Database is up," to syslog and sets the status of the SAP resource to OK.
Evaluates the failure history.
Based on the failure history, the fault monitor completes one of the following actions.
no action
local restart
failover
For the application server, the fault probe executes the following steps.
Retrieves the process ID for the main dispatcher.
Loops infinitely (sleeps for Thorough_probe_interval).
Checks the health of the SAP resources.
Abnormal exit - If the PMF detects that the SAP process tree has failed, the fault monitor treats this problem as a complete failure. The fault monitor restarts or fails over the SAP resource to another node, based on the resources' failure history.
Health check of the SAP resources through probe - The probe uses the ps(1) command to check the SAP Message Server and main dispatcher processes. If the SAP main dispatcher process is missing from the system's active processes list, the fault monitor treats the problem as a complete failure.
Database connection status through probe - The probe calls the SAP-supplied utility R3trans to check the status of the database connection. Sun Cluster HA for SAP fault probes verify that SAP can connect to the database. Sun Cluster HA for SAP depends, however, on the highly available database fault probes to determine the health of the database. If the database connection status check fails, the fault monitor logs the message, "Database might be down," to syslog and sets the status of the SAP resource to DEGRADED. If the probe checks the status of the database again and the connection is reestablished, the fault monitor logs the message, "Database is up," to syslog. The fault monitor then sets the status of the SAP resource to OK.
Evaluate the failure history.
Based on the failure history, the fault monitor completes one of the following actions.
no action
local restart
failover