LLI Wiki — My Digital Knowledge Base

Start and stop a SAP HANA and SAP environment with sapcontrol

Ordered start and stop of a HANA database, SAP systems (sapcontrol) and an NFS server on Linux.

Procedure to start and stop, in order, a SAP test environment on Linux: one SAP HANA database and two SAP systems, each with two instances (numbers 00 and 10). Adapt the <sid>adm user names to your own SIDs.

Important: the server exporting NFS must be up before any other, because the other SAP servers mount their file systems from it.

Start-up

  1. Power on the NFS server first, then the other servers of the environment.
  2. On the database server, start SAP HANA:
su - hdbadm -c "HDB start"

Wait 5 to 10 minutes for the database to start and load into memory. Watch memory with:

free -m
  1. Start the instances of the first SAP system:
su - sid1adm
sapcontrol -nr 00 -function StartSystem ALL
sapcontrol -nr 10 -function StartSystem ALL
exit
  1. Check the application status:
su - sid1adm
sapcontrol -nr 00 -function GetProcessList
sapcontrol -nr 10 -function GetProcessList
sapcontrol -nr 00 -function GetSystemInstanceList
exit
  1. Repeat steps 3 and 4 for the second SAP system (user sid2adm).

Shutdown

Shutdown is done in reverse order: applications, database, then servers.

  1. Stop the instances of each SAP system (instance 10, then instance 00):
su - sid1adm
sapcontrol -nr 10 -function StopSystem ALL
sapcontrol -nr 00 -function StopSystem ALL
exit

Do the same with sid2adm.

  1. Stop the SAP HANA database:
su - hdbadm -c "HDB stop"
  1. Power off each server, the NFS server last:
shutdown -h now

Notes

Mastodon LLIMastodon SocialFosstodon