Cluster Server 8.0 Configuration Guide for SAP Web Application Server - Windows
- Section I. Getting Started
- Introducing the Veritas High Availability Agent for SAP Web Application Server
- About the Veritas High Availability agent for SAP Web Application Server
- How does the Veritas High Availability solution work
- Agent functions
- Installing and configuring the SAP Web Application Server for high availability
- Setting up SAP systems for clustering
- Configuring the Enqueue Replication Server
- Clustering an SAP instance
- Introducing the Veritas High Availability Agent for SAP Web Application Server
- Section II. Configuring the application for high availability
- Section III. Troubleshooting the Agent
- Troubleshooting the agent for SAP Web Application Server
- Troubleshooting common problems
- Reviewing SAP Web Application Server agent log files
- Reviewing error log files
- Troubleshooting the agent for SAP Web Application Server
- Appendix A. Sample Configurations
Configuring the SAPWebAS preonline script
In a clustered environment, the SAP administrator installs and configures SAP Enqueue and SAP Enqueue Replication Server. SAP Enqueue and Enqueue Replication Server have the following requisites:
If an Enqueue server instance fails, the server must fail over to the node on which the Enqueue Replication Server instance is running.
If the Enqueue Replication Server instance fails, the instance must fail over to a node on which Enqueue Server is NOT running.
The SAPWebAS preonline script facilitates proper Enqueue server failover behavior. The existing VCS preonline script calls the SAPWebAS preonline script.
The SAPWebAS preonline script performs the following tasks:
If the service group for which the script is running does not have an Enqueue server or an Enqueue Replication Server resource, the script returns the control to the VCS preonline script.
If the service group has an Enqueue server or Enqueue Replication Server resource, the script determines the node on which the online operation can be performed. The script also ensures that the online operation does not execute the VCS preonline script again.
To accomplish this failover behavior, you must configure the VCS preonline script.
The VCS preonline trigger calls an external preonline trigger utility - sapwebaspreonline.exe. The initiated preonline trigger performs the steps necessary for correct failover behavior of the Enqueue servers. The sapwebaspreonline.exe utility is located in the %VCS_HOME%\bin\SAPWebAS
directory.
To configure SAPWebAS preonline script
- Go to the
%VCS_HOME%\bin\Trigger
directory. - Skip this step if the preonline file exists in this directory.
If the preonline file does not exist, copy the sample preonline trigger file from the
%VCS_HOME%\bin\Sample_Triggers directory
to the%VCS_HOME%\bin\Triggers
directory, rename the file to preonline, and then use this file. - Add the following lines to the preonline file:
#-------------------------------------------------------------- # Start sapwebas preonline trigger. #-------------------------------------------------------------- # Perl preonline.pl <system> <group> <whyonlining> <systemwheregroupfaulted> my $system = $ARGV[0]; my $group = $ARGV[1]; my $whyonlining = $ARGV[2]; my $systemwheregroupfaulted = undef; my $sArgs = join(' ', @ARGV); VCSAG_LOG_MSG("I", "Arguments [$sArgs]", 15041); if(defined $ARGV[3]) { $systemwheregroupfaulted = $ARGV[3]; } my $SAPWebASPreOnlineTrigger = sprintf("%s\\bin\\SAPWebAS\\ sapwebaspreonline.exe", $vcs_home); VCSAG_LOG_MSG("I", "The trigger command is [$SAPPreOnlineTrigger]", 15041); if(defined $systemwheregroupfaulted) { VCSAG_LOG_MSG("I", "The group is faulted on syetem = [$systemwheregroupfaulted]", 15042); $CMD = sprintf("\"%s\" %s %s %s %s", $SAPWebASPreOnlineTrigger, $system, $group, $whyonlining, $systemwheregroupfaulted); } else { $CMD = sprintf("\"%s\" %s %s %s", $SAPWebASPreOnlineTrigger, $system, $group, $whyonlining); } system($CMD); my $exit_value = $? >> 8; VCSAG_LOG_MSG("I", "The exit code from the trigger: [$exit_value].", 15046, $exit_value); if($exit_value == 0) { VCSAG_LOG_MSG("I", "The PreOnline Trigger for SAP executed successfully.", 15046); exit; } elsif($exit_value == 1) { VCSAG_LOG_MSG("I", "The PreOnline Trigger for SAP FAILED.", 15047); exit; } else { VCSAG_LOG_MSG("I", "Unknown PreOnline trigger.", 15048); } #-------------------------------------------------------------- # End sapwebas preonline trigger. #-------------------------------------------------------------- . . # give control back to HAD. if (defined $ARGV[3]) { '\"$vcs_home\\bin\\hagrp\" -online -nopre $ARGV[1] -sys $ARGV[0] -checkpartial $ARGV[3]'; exit; } '\"$vcs_home\\bin\\hagrp\" -online -nopre $ARGV[1] -sys $ARGV[0]'; exit;
- Use the following command to set the preonline trigger attribute to true for the Service Groups to which the Enqueue and Enqueue Replication server instances belongs:
C:\> hagrp -modify service_group PreOnline 1 -sys system
The preonline script is now configured to facilitate Enqueue and Enqueue Replication server behavior. You can view the logs in the VCS engine log, engine_A.log.
Note:
Once the preonline trigger is configured, you may see unexpected behavior while manually switching or performing online operations on the Enqueue Replication service group. This behavior is a result of the control logic within the preonline trigger that protects the Enqueue lock table. For system maintenance, if you prefer to perform manual operations on the service groups, you can do so by disabling the preonline trigger.
To disable the preonline trigger, use the following command:
C:\> hagrp -modify service_group PreOnline 0 -sys system