Soft stop SAP systems, application server instances and HANA database

In this how-to guide, you'll learn to soft stop your SAP systems, individual instances and HANA database through the Virtual Instance for SAP solutions (VIS) resource in Azure Center for SAP solutions. You can stop your system smoothly by making sure that existing user connections, batch processes, etc. are drained first.

Using the Azure PowerShell, CLI and REST API interfaces, you can:

  • Soft stop the entire SAP system, that is the application server instances and central services instance.
  • Soft stop specific SAP application server instances.
  • Soft stop HANA database.

Prerequisites

Soft stop SAP system

Currently, you can initiate a soft stop operation from the Azure PowerShell, Azure Command-Line Interface (Azure CLI) and REST API interfaces. You must use the stop operation along with a soft stop timeout value in seconds to initiate a soft stop. Once you initiate soft stop on VIS and the operation is successfully triggered on the SAP system, then monitor the Health and Status of the VIS to check if the system has stopped.

Note

When attempting to soft stop an SAP system or application server instance using Azure Center for SAP solutions, soft stop timeout value must be greater than 0 and less than 82800 seconds.

Soft stop system in PowerShell

Use the Stop-AzWorkloadsSapVirtualInstance command:

     Stop-AzWorkloadsSapVirtualInstance -InputObject /subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Workloads/sapVirtualInstances/DB0 --SoftStopTimeoutSecond 300 `

Soft stop system in CLI

Use the az workloads sap-virtual-instance stop command:

     az workloads sap-virtual-instance stop --id /subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.Workloads/sapVirtualInstances/DB0 --soft-stop-timeout-seconds 300

Soft stop system using REST API

Use this sample payload to soft stop an SAP system. You can specify the soft stop timeout value in seconds.

Soft stop SAP Application server instance

You can soft stop a specific application server in Azure Center for SAP solutions using Azure PowerShell, CLI and REST API interfaces. Once you initiate soft stop on application server and the operation is successfully triggered, then monitor Health and Status of the application server instance to check if it has stopped.

To soft stop an application server represented as an App server instance for SAP solutions resource:

Using PowerShell

Use the Stop-AzWorkloadsSapApplicationInstance command:

     Stop-AzWorkloadsSapApplicationInstance -InputObject /subscriptions/Sub1/resourceGroups/RG1/providers/Microsoft.Workloads/sapVirtualInstances/DB0/applicationInstances/app0 --SoftStopTimeoutSecond 300 `

Using CLI

Use the az workloads sap-application-server-instance stop command:

     az workloads sap-application-server-instance stop --id /subscriptions/Sub1/resourceGroups/RG1/providers/Microsoft.Workloads/sapVirtualInstances/DB0/applicationInstances/app0 --soft-stop-timeout-seconds 300

Using REST API

Use this sample payload to soft stop an application server instance. You can specify the soft stop timeout value in seconds.

Soft stop HANA database

You can soft stop the HANA database so that the database stops gracefully after all running statements have finished. You can use the Azure PowerShell, CLI and REST API interfaces to soft stop database. Once you initiate soft stop on HANA database and the operation is successfully triggered on the database instance, then monitor the status of the database instance on the VIS to check if it has stopped.

Note

When attempting to soft stop HANA database instance using Azure Center for SAP solutions, soft stop timeout value must be greater than 0 and less than 1800 seconds.

Using PowerShell

Use the Stop-AzWorkloadsSapDatabaseInstance command:

     Stop-AzWorkloadsSapDatabaseInstance -InputObject /subscriptions/Sub1/resourceGroups/RG1/providers/Microsoft.Workloads/sapVirtualInstances/DB0/databaseInstances/ab0 --SoftStopTimeoutSecond 300 `

Using CLI

Use the az workloads sap-database-instance stop command:

     az workloads sap-database-instance stop --id /subscriptions/Sub1/resourceGroups/RG1/providers/Microsoft.Workloads/sapVirtualInstances/DB0/databaseInstances/ab0 --soft-stop-timeout-seconds 300

Using REST API

Use this sample payload to soft stop HANA database. You can specify the soft stop timeout value in seconds.