Operating System - HP-UX
1849293 Members
6227 Online
104042 Solutions
New Discussion

Stop/Star two diferent systems on a SAP Service Guard cluster

 
SOLVED
Go to solution
fernando picouto
Occasional Contributor

Stop/Star two diferent systems on a SAP Service Guard cluster

Hi everybody,
I´ve the following implementacion, i need your point of view
-Two nodes with SAP.
First node with R3 in cluster mode ( one package pkgr3)
Second node o adoptive, with SAP BW in no HA enviroment.
I need what is the correct way to perform the following issue
I need to stop BW on the second node when pkgr3 package is failover.
I´m trying to run on scripts by adding lines codes in dbci.cntl, but the sysmen report one error in one line about the check the version of control scripts of MC/ServiceGuard o SGeRAC.
Scripts version, service guard, sgesap are support.
Thank you in advanced
Fern
7 REPLIES 7
Geoff Wild
Honored Contributor

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

Fairly easy to do - we used to run our QA system as a pcakage on the node that wasn't running prod.

Create your own CUSTOMER DEFINED FUNCTIONS

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 }'`
#IQA=`remsh iqadbci -n "/usr/bin/hostname"`
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
}


Then in the MAIN part of the cntl:


verify_physical_data_replication # add hook for MetroCluster

customer_defined_halt_iqa

activate_volume_group

activate_disk_group

customer_defined_fsck_mount

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.
Johan Lorimier
Frequent Advisor

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

Hi,

Use a test with the hostname,
If hostname = second_node_name
then stop_BW
endif
Put this this addon lines in the .cntl file, or in any scripts that are call by the .cntl file.
In our case the cntl use a sap.fonctions script in /etc/cmcluster, but the file depends on the SAP integration with MCSG.

Johan
Geoff Wild
Honored Contributor
Solution

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

Here is above in txt - formats nicer...


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.
Geoff Wild
Honored Contributor

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

We use sap.functions as well - but you want to stop the BW package prior to getting there - that's why we created a function to do that prior to the "function customer_defined_run_cmds"...

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.
fernando picouto
Occasional Contributor

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

If I adding line code on dbci.cntl
function cutomer_defined_halt_package-name
Must I deleted or uncomment ?
function customer_defined_run_cms and
function customer_defined_halt_cms
MAIN part is MAINLINE Control Scripts ?
Thank you in advanced
Geoff Wild
Honored Contributor

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

Nope - don't uncomment - just leave those as well - because that's what starts/stops your Prod package.

Here's the main section of the cntl script.

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.
sreeramam
Occasional Advisor

Re: Stop/Star two diferent systems on a SAP Service Guard cluster

This information is really usefull