This is just a short article on different ways to identify when SAP HANA hosts & services were restarted.
Option 1
- Go to SAP HANA Studio
- Administration View
- Landscape Tab
You will find numerous details, including the launch timings of SAP HANA services and hosts, in the "
Services" and "
Hosts" page.
Option 2
- Logon to backend system
- Open tcode DBACOCKPIT or ST04
- Configurations
- Services
Option 3
Fetch the SQL script from this SAP note
1969700. SQL: "
HANA_Startup_StartupTimes" . Open the script and use the modification section as below to make any changes based on your needs.
Once you run the script either in DBACOCKPIT or SAP HANA Studio then you will get an output like below.
This SQL statement provides an overview of host and / or service startup times including "startup delays" - i.e. the time a host or service is started after the first started host or service. Only the last restart is shown, not the history of restarts.
Option 4
Again using another SQL script file from the third step above you can use the SQL: "
HANA_TraceFiles_Content" script aswell to find out the HANA services restarts and crashes.
You can use SQL: "HANA_TraceFiles_Content" (SAP_NOTE = 2177064) available via SAP Note
1969700 in order to scan the trace files for these messages and display them.
- Only the service trace files are covered (no alert files, OOM or RTE dumps).
- Runtime and memory consumption can be significant in case of many and large trace files, so try to limit the selection as much as possible.
- Make sure that statement_memory_limit is properly set to rule out system instabilities in case of high memory consumption.
Option 5
Lastly the other way is check and see either in ST04 or SAP HANA studio if there are any HANA alert (4). When checking the Alerts tab in HANA there is an alert called “servicename on host Host name port ,-,-,-,-,-,- has been restarted at -,-,-,- --,-,-,-, -,-,-,- -,-, 000000”.
If yes then check out this SAP note How to handle
HANA Alert 4: ‘Restarted services’
If the service was restarted manually by DB administrator on purpose, then the alert can be ignored.
For any restarted service alerts, you need to check the daemon trace to find the reason why the service has been restarted.
Reference:
2177064 - FAQ: SAP HANA Service Restarts and Crashes