Operating System - HP-UX
1823256 Members
2967 Online
109648 Solutions
New Discussion юеВ

ServiceGuard extention for SAP/closing down two test-SID

 
Lars Mousten_1
Occasional Contributor

ServiceGuard extention for SAP/closing down two test-SID

Hi,

I have a problem with serviceguard. I have a cluster with two nodes. The failover node is running two SAP systems which are being closed down when a failover happens. However since there are two SAP instances they have different listener names, different from the default "LISTENER".
My failover dosn`t work automatically right now, but I can close down the two SAP systems manually and then successfully make the failover.
In order to close down the two SAP systems during a failover I have configured in sap.conf:


RMNR[0]=00 ;RMDEP[0]=-1 ; RMADM[0]=adm
RMNR[1]=10 ;RMDEP[1]=-1 ; RMADM[1]=adm

where the RMNR are the CINR of the SAP instances which are to be shutdown.
Are there anything else I have to do in order to shutdown the SAP systems during failover, when I have two SAP systems to shutdown ???

Thanks in advance.
Once in your lifetime...
3 REPLIES 3
Geoff Wild
Honored Contributor

Re: ServiceGuard extention for SAP/closing down two test-SID

Here's what I used to do, configured into the production cntl script - not sap.conf:

# START OF CUSTOMER DEFINED FUNCTIONS

# This function is a place holder for customer define functions.
# You should define all actions you want to happen here, before the service is
# started. You can create as many functions as you need.

function customer_defined_halt_iqa
{
print "Checking if iqapkg is running"

STATE=`cmviewcl | grep iqa | awk '{ print $2 }'`
if [[ $STATE = "down" ]]
then
echo "IQA is down...starting up IPR"
else
if [[ $STATE = "up" ]]
then
IQA=`cmviewcl | grep iqa | awk '{ print $5 }'`
print "IQA is running...on the current host: \c"
print ${IQA}
if [[ ${IQA} = $(/usr/bin/hostname) ]]
then
print "halting iqapkg on ${IQA}"
/usr/sbin/cmhaltpkg iqapkg
fi
fi
fi
}

function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
/etc/cmcluster/IPRDBCI/sapdbci.cntl startDBCI IPR
test_return 51
}


Then, add the call to the function at bottom of script:

print "\n\t########### Node \"$(hostname)\": Starting package at $(date) ###########"


verify_physical_data_replication # add hook for MetroCluster

customer_defined_halt_iqa

activate_volume_group

activate_disk_group

check_and_mount

verify_ha_nfs $1 # add hook for NFS

add_ip_address

get_ownership_dtc

customer_defined_run_cmds

start_services

start_resources



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Lars Mousten_1
Occasional Contributor

Re: ServiceGuard extention for SAP/closing down two test-SID

Hi,

Thanks ......
Then you have your iqa in a seperate package ??
Once in your lifetime...
Geoff Wild
Honored Contributor

Re: ServiceGuard extention for SAP/closing down two test-SID

That's correct - IQA was a separate package - that one was set to not failover automatically...

You should be able to configure your cluster the same way - prod fails over to node2 - if sappkg1 is running - stop it, same for sappkg2...then start sapprodpkg...

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.