# Stop/Start SAP service via ansible

**URL:** <https://forum.ansible.com/t/stop-start-sap-service-via-ansible/37570>\
**Category:** Ansible Project\
**Created:** [January 23, 2023, 4:04pm UTC](https://forum.ansible.com/t/stop-start-sap-service-via-ansible/37570 "2023-01-23T16:04:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumaresan\_M](https://avatars.discourse-cdn.com/v4/letter/k/e19b73/32.png) [@Kumaresan\_M](https://forum.ansible.com/u/Kumaresan_M)\
**Post date:** [January 23, 2023, 4:04pm UTC](https://forum.ansible.com/t/stop-start-sap-service-via-ansible/37570/1 "2023-01-23T16:04:14Z")

</div>

Hi,

Could someone help here to stop/start sap services via ansible?

Regards  
Kumar

---

<div class="post-metadata">

**Author:** ![Werner\_Flamme](https://avatars.discourse-cdn.com/v4/letter/w/c68b51/32.png) [@Werner\_Flamme](https://forum.ansible.com/u/Werner_Flamme)\
**Post date:** [January 23, 2023, 5:02pm UTC](https://forum.ansible.com/t/stop-start-sap-service-via-ansible/37570/2 "2023-01-23T17:02:46Z")

</div>

Hi Kumar,

on Linux it should be sufficient to execute /usr/sap/sapservices to start them.

Stopping - not so simple. User sidadm can issue the command "sapcontrol -nr \<instancenumber\> -function Stop" (or StopSystem), but you have to know the sidadm's name and the instance number somehow.

HTH,  
Werner
