To start and stop an SAP HANA database using the sapcontrol
tool, you can execute the following commands:
- Start HANA database:
sapcontrol -nr <instance_number> -function StartSystem HDB
- Replace
<instance_number>
with the number of the HANA instance you want to start. For example, if you want to start instance 00, the command would be: sapcontrol -nr 00 -function StartSystem HDB
- Stop HANA database:
sapcontrol -nr <instance_number> -function StopSystem HDB
- Replace
<instance_number>
with the number of the HANA instance you want to stop. For example, to stop instance 00: sapcontrol -nr 00 -function StopSystem HDB
Note: The sapcontrol
command requires administrative privileges, so you might need to execute it as a superuser or with appropriate administrative permissions. Also, ensure that the sapcontrol
tool is in your system’s PATH or provide the full path to the sapcontrol
executable in the command.