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
%VCS_HOME%\bin\Trigger
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.
#-------------------------------------------------------------- # 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;
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.