The goal of this lesson is to get to know the different ways to start and stop SAP HANA.
As the administrator of SAP HANA database, you need to stop the system for maintenance purposes.
SAP HANA Database could be started or stopped using SAP HANA Studio or by OS commands.
To be able to start and to stop an SAP HANA system you must have the credentials of the operating system user (<sid>adm) that was created when the system was installed.
The SAP Start service (sapstartsrv) is the standard SAP mechanism for starting and stopping systems. It starts all necessary database services, such as the nameserver, indexserver, and statisticsserver services.
When staring the SAP HANA database with SAP HANA Studio you have to enter the user name and password of the operating system user <sid>adm.
Optionally a start timeout could be specified. The start timeout defines how long sapstartsrv waits for a service to start. If the end of the timeout period is reached, the remaining services are not started.
Right click on the system and select ‘START’
The Administration editor opens in diagnosis mode and the database services start one by one. When all services have started, a green dot appears in the system icon in the Navigator view.
When stopping the SAP HANA database you could define how you want to stop the system:
- A hard shutdown forces all database services on all hosts to stop immediately.
- A soft shutdown triggers a savepoint operation before stopping all database services. During the savepoint operation, all modified data is written to disk. You can also specify a timeout after which a hard shutdown is triggered.
- This value specifies how long to wait for a service to stop. If the timeout expires, the remaining services are shut down anyway.
Right click on your system and select ‘STOP’
The Administration editor opens in diagnosis mode and the database services stop one by one. When all services have stopped, a red dot appears in the system icon in the Navigator view.
On operating system level the SAP HANA database could be started or stopped using the commands sapcontrol or HDB.
The SAP HANA studio normally collects information about the system using SQL statements. However, when the system has not yet started, no SQL connection is available. Therefore, while the system is starting up or is stopped, the SAP HANA studio collects information about the database using the connection of the SAP Start (sapstartsrv) service. You can view this information in the Administration editor in diagnosis mode. In this way, you can analyze any problems that may
occur during startup or while the system is stopped. You can also read diagnosis files even when the system is stopped.
The Administration editor opens automatically in diagnosis mode in the following situations:
• When you open the Administration editor for a system without an SQL connection
• When you initiate the start, stop, or restart of a system
Stopping and Starting Database Services
You can stop and start the individual database services (nameserver, indexserver, statisticsserver, xsengine and so on) running on hosts.
To stop and (re)start database services, you must have the system privilege SERVICE ADMIN.
Examples for situations where you have to restart an individual database service are:
• A host in a distributed system failed and a standby host took over. However, the services of the failed host remain inactive even after the host is reachable again. In this case, you need to restart the services manually.
• After an update of SAP HANA extended application services (SAP HANA XS), the xsengine service needs to be restarted.
The following options for stopping and (re)start database services are possible:
- Stop: The service is stopped normally and then typically restarted.
- Kill: The service is stopped immediately and then typically restarted.
- Reconfigure service: The service is reconfigured. This means that any changes made
to parameters in the system’s configuration files are applied.
- Start Missing Services : Any inactive services are started.