cancel
Showing results for 
Search instead for 
Did you mean: 

HACMP Clustering Script for SAP ECC 6.0 (SR1) - Automatic Failover-Oracle10

gautam_poddar2
Participant
0 Kudos

Hello,

I have installed the SAP ECC 6.0 (SR1) under AIX 5.3 / Oracle 10g with HACMP Clustering environment. Manual Failover is working fine. ASCS and Database instances are loaded in share drive with Virtual IP and Virtual name. Central Instance and Dialog Instance are loaded locally in Node A and Node B. I want to get HACMP Clustering script(automatic failover script) for Automation. Please help me if you have.

Thanks

Gautam Poddar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

This has to be done by OS. your cluster will take care of this, as soon as there is any problem in another node, cluster heartbit will fail and your cluster will swithover to next node. you have to test this, as hardboot one of the server and try.

Cheers,

-Sunil

Former Member
0 Kudos

Here are HA stop & start scripts that you should be able adapt for your particular circumstances. Based on earlier versions of SAP / Oracle but assume should be a reasonable guide

Script to start SAP is start_sap_prd

#!/bin/ksh

####################################################################

  1. Script: /usr/local/bin/cluster/start_sap_prd

  2. Comments: HACMP Application START script for PRD

###################################################################

#

  1. Show me obvious information in hacmp.out

#

banner "Starting"

banner "PRD SAP"

#

  1. Set the oracle and sap owner.

#

ORASID="PRD"

SAPADM="prdadm"

ORAUSR="oraprd"

VIRTUALHOST="vhost"

DEVHOST="vhostdev"

#

  1. Get the volume groups for this resource group

#

RG=$( /usr/es/sbin/cluster/utilities/cllsgrp | grep -i $ )

VG_LIST=$( /usr/es/sbin/cluster/utilities/cllsres -g $ | \

grep "VOLUME_GROUP=" | \

awk -F\" '{ print $2 }' )

#

  1. Check the transport directory is mounted.

#

if mount | grep -w "/usr/sap/trans"

then

print "Transport directory is already mounted."

else

cd /tmp

print "Attempting a background mount of the transport directory."

nohup mount -o intr,bg,soft :/usr/sap/trans1 /usr/sap/trans &

fi

####################################################################

#Start SAP and Oracle

####################################################################

#

#Start listener

#

su - $ -c /rprd/oracle/PRD/920_64/bin/lsnrctl start rc=$? if [ $? != 0 ] then echo "ERROR: Listener failed to start\n" fi # #Start Database # su - $ -c "/rprd/oracle/PRD/bin/start_database_PRD.sh"

sleep 20

#

  1. Standard sapstart script

#

su - $ -c startsap $

  1. Script: /usr/local/bin/cluster/stop_sap_prd
  2. Dated: 01/11/06
  3. Application: Oracle/SAP
  4. Comments: HACMP Application STOP script for SAP / Oracle PRD
  5. Show me obvious information in hacmp.out
  6. Set the oracle and sap owner.
rc=$? if [ $? != 0 ] then echo "ERROR: Failed to start SAP\n" fi exit 0 Script to stop SAP is stop_sap_prd #!/bin/ksh set -x #################################################################### #################################################################### # # banner "stopping" banner "PRD SAP" # # ORASID="PRD" SAPADM="prdadm" ORAUSR="oraprd" VIRTUALHOST="vhost" ######################################################################## #Stop SAP/Oracle ######################################################################## su - $ -c stopsap $

rc=$?

if [ $? != 0 ]

then

echo "ERROR: Failed to stop SAP and Oracle\n"

break

fi

#

  1. Stop SAP collector and Oracle listener.

#

su - $ -c /usr/sap/PRD/SYS/exe/run/saposcol -k

rc=$?

if [ $? != 0 ]

then

echo "ERROR: Failed to stop SAPOSCOL \n"

fi

su - $ -c /rprd/oracle/PRD/920_64/bin/lsnrctl stop

rc=$?

if [ $? != 0 ]

then

echo "ERROR: Listener failed to stop\n"

fi

if mount | grep -w "/usr/sap/trans"

then

print "Transport directory is mounted."

/usr/es/sbin/cluster/events/utils/cl_nfskill -k -u /usr/sap/trans

sleep 1

/usr/es/sbin/cluster/events/utils/cl_nfskill -k -u /usr/sap/trans

sleep 1

umount -f /usr/sap/trans &

else

print "Transport directory is not mounted."

fi

exit 0