Skip to Content
Technical Articles
Author's profile photo Shraddha Shetty

Automation Pilot : Start & Stop HANA Instance, Schedule Executions on Automation Pilot

This blog provides the command to start and stop the SAP HANA Instance and also schedule to do the same in a timely manner. This blog aims to provide an approach on how one can automate the uptime of a SAP HANA Cloud instance which reduces operational costs. Scheduling the HANA Start/Stop sample shows how to reduce the manual effort & reliable execution by automation.

You can read more on SAP Automation Pilot (here).

Pre-requisites :

Open the Automation Pilot from your BTP subaccount.



Dashboard of Automation Pilot

Note : You can create a Catalog and clone the existing commands provided by Automation Pilot for easier access or skip to Step 2 to proceed with creating inputs and trigger the command directly.

Step 1: Lets set up the command and inputs in a catalog. Create a new catalog.

Create a new catalog

Once the catalog is created, we have to add the commands and inputs into it. You can already view some of the predefined commands that exists in the Automation Pilot by going to the commands section.


Predefined Commands

Search for “StartHanaCloudInstance” and choose the one below.


You can click on clone the “StartHanaCloudInstance”  

Select the catalog that was created and add this cloned command into the StartStop Catalog.

Repeat the same steps to do the same for StopHanaCloudInstance command and add it to the StartStop Catalog.

Step 2: Now, create an input to store the connection details for an SAP HANA Cloud database.

Add the keys and assign the respective values to the keys.

Values that must be assigned are as follows:

Region – your region details ( eg: cf-eu10 )

subAccount – the name of your Cloud Foundry ORGANIZATION

resourceGroup – the name your Cloud Foundry CF SPACE

resourceName – the name of your HANA SERVICE INSTANCE

user – Your technical user’s email address

password – Your technical user’s password

Note : When storing a password. always turn on the sensitive option.

Note : For SAP Users, you can create a p-user(here). Also when using the p-user, add this user in Global account level, Subaccount level, add as Org members in Cloud Foundry level. 

Step 3: In the newly created command clone, Go to ‘StartHanaCloudInstanceClone’ & select input and add an additional value which is the StartStopInputs input.

Assign the values below

Step 4: Now add an executor

Click on ‘Here’ & Add the below values,

Step 5: Now once you have the inputs and executor ready. Trigger the execution

Step 6: Select the StartStopInputs for Inputs and all the values will be automatically assigned to its respective fields. Click on trigger.

You can see the status and the progress of the execution of the command.

Step 7: Check the SAP HANA Cloud Central to see if the HANA cloud instance has been started.

Once the execution is finished successfully, you will see the below


Step 8: Perform the same steps to do the StopHANACloudInstance

  • Clone the existing command from the command list
  • Add the input keys
  • Add the executor called “StopHANA”

You can use the same inputs i.e.  StartStopInputs

Once you click on the trigger, it will execute to stop the SAP HANA Cloud instance.


Check the SAP HANA Cloud central to see the status, it will be as shown in the below image.

Schedule Executions

You can also schedule the above commands to execute on a desired time period. Scheduling the execution can help to reduce the active running time of SAP HANA Cloud instances to the working hours of the developers. This can reduce the operational costs of running database.

Create a new schedule and provide the command details and user input details.

Schedule as per needed

You can now schedule the start and stop of SAP HANA Cloud instances as per needed and it will run the jobs accordingly.

Quick links : You can also follow the below tutorial to get more hands on with Automation Pilot. The below tutorial explains an approach to schedule SQL statements which are run against an SAP HANA Cloud database.


Please share your valuable feedback!




Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Martin Pankraz
      Martin Pankraz

      Interesting! How about ERP and any-premise Hana?

      @Community have a look here to learn more about self-service snoozing. By the way the Azure Automation Account is supported by the SAP Private Link for some months now. You might trigger the SAP snoozing scripts from any BTP app.



      Author's profile photo Tim Kreis
      Tim Kreis

      We´re having trouble getting this to work.

      We have deployed our SAP HANA Cloud Instance on subaccount level and not in a space. Is there something we have to do different or is it just not possible at all?

      Additionally when adding a executor to a command we get the flipped command inside the config-overlay. So the Executor from the StartHana command can only get the StopHana command and vice versa.




      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen

      One other option to consider is to use the SAP BTP CLI to start and stop your HANA Cloud instances that are deployed on the subaccount level.  An example of the steps to do this is available at Manage SAP HANA Cloud using the BTP CLI.

      Hope that helps,
      Dan van Leeuwen

      Author's profile photo Kaloyan Simitchiyski
      Kaloyan Simitchiyski

      Hi Tim,


      Automation Pilot supports the management of HANA Cloud on space level only. We are exploring the possibility to extend this to subaccount level as well. I'll reply back to you once this is available.

      Regarding your second remark, this sounds like a potential bug. Let's communicate over email to gather more context and solve your issue. You can contact me (kaloyan.simitchiyski at sap dot com) and Biser Simeonov (biser.simeonov at sap dot com).


      Best regards,


      Author's profile photo David BIZIEN
      David BIZIEN


      Is it possible, now, to start and stop HANA at subaccount Level ?


      David Bizien

      Author's profile photo Antoniya Tsoneva
      Antoniya Tsoneva

      Dear David,

      I'm delighted to inform you that starting and stopping HANA Cloud at the subaccount level is now possible through the utilization of the Service Manager catalog within Automation Pilot. In the near future, we will be sharing an example in our GitHub samples repository that demonstrates how this can be achieved. Please don't hesitate to reach out if you have any further inquiries.

      Best regards,

      Antoniya Tsoneva

      Automation Pilot Team

      Author's profile photo Ravi Condamoor
      Ravi Condamoor

      Instead of

      user – Your technical user’s email address

      password – Your technical user’s passwordc

      can I create a temporary account to be explicitly used for Automation Pilot?  My whole team has access to the subaccount and Automation Pilot instance and I don't want to expose my personal info.

      Author's profile photo Shraddha Shetty
      Shraddha Shetty
      Blog Post Author

      Hi Ravi,

      Yes you should create a technical account to use SAP Automation Pilot. This user has to be treated the same way as your other users in your subaccount which has the right roles and entitlements.



      Author's profile photo Mohit Bansal
      Mohit Bansal

      Hi  Shraddha Shetty , Thanks for this detailed blog. I have quick issue while testing the above scenarios.

      I have setup the Automation Pilot in Singapore Region(ap21) and Hana cloud instance in other sub account(us10). We are giving the HANA Cloud Instance ID as below and getting the error : "Service instance with ID 'instance of GUID' was not found.

      Appreciate your suggestion, in case it is some limitation or some thing missed from my side.









      Author's profile photo Bhargab Kumar Sarma
      Bhargab Kumar Sarma

      I also have the same question. Do you have any inputs?

      Author's profile photo Antoniya Tsoneva
      Antoniya Tsoneva

      Hello Bhargab Kumar Sarma,

      I am happy to share with you that we have a GitHub repository that contains example Automation Pilot commands which demonstrate the automation of various scenarios such as Start/Stop Hana Cloud Databases.  However, without knowing the specifics of your problem, I encourage you to explore the repository and refer to the provided example. If you have any specific questions or require further clarification, please feel free to reach out to us via email (support dot autopilot at groups dot sap dot com).

      Best regards,

      Automation Pilot Team

      Author's profile photo Basis SAP
      Basis SAP

      Hi Antoniya,


      I have Automation Pilot in Singapore region and Hana Cloud instance in US region in trial account, I am getting this error "Service instance with ID '<hana cloud instance id>' was not found,




      Author's profile photo Antoniya Tsoneva
      Antoniya Tsoneva

      Hello Bhargab,

      Please ensure that you have provided the correct instance ID for your HANA Cloud instance and check that you have followed the example in repository correctly. If the issue persists or if you have further questions, please provide more details for better assistance.

      Kind regards,

      Automation Pilot Team

      Author's profile photo Bhargab Kumar Sarma
      Bhargab Kumar Sarma

      Hi Antoniya,

      This is the exact error I got "Service instance with ID '8d09e073-c875-4e24-bb69-4ca2d6d3cfc3' was not found" and I have followed all the steps mentioned in the blog.

      Attaching the screenshot of the instance ID.




      Author's profile photo Antoniya Tsoneva
      Antoniya Tsoneva

      Hello Bhargab,

      I will suggest to schedule a brief Teams call to discuss the problems you are experiencing and provide immediate assistance. Please let me know your availability, preferred date, and time for the call, and I will promptly schedule it.

      Kind regards,


      Author's profile photo JoonChul Jung
      JoonChul Jung


      Thanks for very valuable contents.

      Is it possible to add multiple instance ID in Input so that multiple HANA instances are started/stopped at a command?

      Best Regards,
      Author's profile photo Antoniya Tsoneva
      Antoniya Tsoneva

      Hello JoonChul Jung,

      Thank you for your question!

      Yes, it is possible to start/stop multiple HANA instances at one command. We have an example how this works in our samples repository in GitHub. You can directly import the content in your Automation Pilot tenant and use the command afterwards. If you have any further questions, do not hesitate to ask here or write to support dot autopilot at groups dot sap dot com.

      Best regards,

      Automation Pilot Team