Start and stop a SAP system on HANA with sapcontrol
Start and stop order for a SAP system and its HANA database using HDB and sapcontrol.
Procedure to start and stop a small SAP landscape that runs on a SAP HANA database, using sapcontrol and HDB. In the examples, <hanasid>adm is the HANA OS administrator and <sid>adm the SAP application OS administrator; instance numbers (10, 11) depend on your installation.
Important: the server that exports NFS to the other SAP servers must be up first, because the other servers mount their shared directories from it.
Start
- Power on the NFS server, then the database server.
- On the database server, start the HANA database:
sudo -i
su - <hanasid>adm -c "HDB start"
Wait 5 to 10 minutes while the database loads into memory. Monitor the memory with:
free -m
- Start the SAP instances (as the application administrator):
sudo -i
su - <sid>adm
sapcontrol -nr 10 -function StartSystem ALL
sapcontrol -nr 11 -function StartSystem ALL
exit
- Check the status:
su - <sid>adm
sapcontrol -nr 10 -function GetProcessList
sapcontrol -nr 11 -function GetProcessList
sapcontrol -nr 10 -function GetSystemInstanceList
exit
Stop
Stop in the reverse order: application instances, then the database, then the servers.
- Stop the SAP instances:
sudo -i
su - <sid>adm
sapcontrol -nr 11 -function StopSystem ALL
sapcontrol -nr 10 -function StopSystem ALL
exit
- Stop the HANA database:
sudo -i
su - <hanasid>adm -c "HDB stop"
- Shut down each server (the NFS server last):
shutdown -h now