SAPCTL Commands for High Availability Environment

SAP

In high availability enviroment for starting/stopping ENQ/Replication, you need to work through SAPCTL commands. SAPCTL provide multiple commands to start service individually or all in one go. it also give you feature that during any failover the service will start on another node without any user interruption.

Below are the some example of SAPCTL commands:

(sid)adm) /usr/sap/sapctl/bin/sapctl
sapctl version 7.0 Patch 0 Production Copyright 2013 Oracle. All rights reserved
USAGE:
sapctl (command) [(object)] -sapsid (SAP_SID) [options]
command : start|stop|status|create|remove|relocate
objects : abapvip|javavip|abapenq|javaenq|abaprep|javarep|abapall|javaall|asinstall|asinstvip|asinst|gwvip|gwinst|wdspvip|wdspinst|all
NOTE:
create and remove commands work on all objects only
For detailed help on each command and object and its options use:
sapctl (command) -h

Check ENQUEUE/ERS Service status
————————————————————————
Login as (sid)adm

/usr/sap/sapctl/bin/Check_Cluster.sh |grep SCS |grep -v startsrv

/usr/sap/sapctl/bin/Check_Cluster.sh |grep rep

Sample output:
(sid)adm) /usr/sap/sapctl/bin/Check_Cluster.sh |grep SCS |grep -v startsrv
sap.SID.ASCS14.abapenq ONLINE ONLINE on (hostname)
sap.SID.ASCS08.abapenq ONLINE ONLINE on (hostname)
sap.SID.SCS09.javaenq ONLINE ONLINE on (hostname)

the above command will show the status of all systems enqueue service started at respective host.

(sid)adm) /usr/sap/sapctl/bin/Check_Cluster.sh |grep rep
sap.SID.ERS43.abaprep ONLINE ONLINE on (hostname)
sap.SID.ERS37.abaprep ONLINE ONLINE on (hostname)
sap.SID.ERS38.javarep ONLINE ONLINE on (hostname)

the above command will show the status of all systems replication service started at respective host.

———————————————————————-
(A)SCS Status Check

/usr/sap/sapctl/bin/sapctl status all -sapsid (SID)

the above command will show the status of single (SID)

(A)SCS Stop/Start All (ENQ/ERS)
/usr/sap/sapctl/bin/sapctl stop all -sapsid (SID)
/usr/sap/sapctl/bin/sapctl start all -sapsid (SID)

the above command will start/stop all services of particular system including ENQ/ERS & Message server.

ASCS Stop/Start ENQ
/usr/sap/sapctl/bin/sapctl stop abapenq -sapsid (SID)
/usr/sap/sapctl/bin/sapctl start abapenq -sapsid (SID)

ASCS Stop/Start ERS
/usr/sap/sapctl/bin/sapctl stop abaprep -sapsid (SID)
/usr/sap/sapctl/bin/sapctl start abaprep -sapsid (SID)

RELOCATE ERS
/usr/sap/sapctl/bin/sapctl relocate –sapsid (SID) –abaprep ERS(instance no.) –to (hostname)

the above command will relocate the replication service of particular system to different host.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.