In a clustered environment, the SAP administrator installs and configures the SAP standalone Enqueue and SAP Enqueue Replication server. The SAP Enqueue and Enqueue Replication Servers have the following requisites:
The SAPWebAS71 preonline script facilitates proper Enqueue server failover behavior. The existing VCS preonline script calls the SAPWebAS71 preonline script.
The SAPWebAS71 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 back 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.
To configure the VCS preonline script in the VCS 4.x and 5.0 environments
If you do not find the preonline file, proceed to step 4.
eval 'exec /opt/VRTSperl/bin/perl -Sw $0 ${1+"$@"}' if 0; use strict; use vars; my $vcs_home = $ENV{"VCS_HOME"}; if (!defined ($vcs_home)) { $vcs_home="/opt/VRTSvcs"; } use ag_i18n_inc; VCSAG_SET_ENVS(); if (!defined $ARGV[0]) { VCSAG_LOG_MSG ("W",
"Failed to continue; undefined system name", 15028); exit; } elsif (!defined $ARGV[1]) { VCSAG_LOG_MSG ("W",
"Failed to continue; undefined group name", 15031); exit; } # Add the SAPWebAS71 Trigger Call here…. #------------------- # Define variables.. #------------------- my $sCmd = '/opt/VRTSvcs/bin/SAPWebAS71/preonline';
For VCS 5.0, the value of $sCmd must be equal to /opt/VRTSagents/ha/bin/SAPWebAS71/preonline.
my $sResLogLevel = 'TRACE'; # Define logging level.. my @lsCmdArgs = ( @ARGV, $sResLogLevel ); # Insert logging level.. my $sArgs = join ( ' ', @lsCmdArgs); my $iExitCode = undef; #------------------------------------------ # Pass control to preonline, if it exists.. #------------------------------------------ if ( -x $sCmd ) { VCSAG_LOG_MSG ("I", "Preonline Cmd [$sCmd] Args [$sArgs]", 15031); system ( $sCmd, @lsCmdArgs ); #------------------- # Exit if successful.. #----------------------------- exit $iExitCode unless ( $iExitCode = $?>> 8 ); } # give control back to HAD. if (defined $ARGV[3]) { system("$vcs_home/bin/hagrp -online -nopre $ARGV[1] -sys $ARGV[0] -checkpartial $ARGV[3]"); exit; } system("$vcs_home/bin/hagrp -online -nopre $ARGV[1] -sys $ARGV[0]"); exit;
hagrp -modify service_groupPreOnline 1
hagrp -modify service_group PreOnline 1 -sys system
The preonline script is now configured to facilitate Enqueue server behavior. To configure the logging level used in the preonline script, you can set the ResLogLevel attribute in the preonline wrapper. You can then view the logs in the VCS engine log, /var/VRTSvcs/log/engine_A.log.