HANA diagnostics and troubleshooting
Diagnosing and resolving issues in SAP HANA landscapes includes monitoring system landscapes, querying system views, and reviewing trace and log files to identify and effectively resolve issues. These steps are critical for identifying and effectively fixing problems based on SAP incidents through program corrections from SAP Standard or from custom code.
We would be happy to support you in the following topics:
Diagnostic files and logs
| Location of diagnostic files | By default, system database diagnostic files are stored on the SAP HANA server under /usr/sap//HDB//trace. Tenant database trace files are stored in a subfolder named DB_. Monitor disk space used for diagnostic files and delete files that are no longer needed. When local secure storage (LSS) is active, it writes trace and dump files to a folder on the shared file system (/usr/sap//lss/shared/data/trace). This folder is only accessible by the crypt user. For more information, see the SAP HANA Security Guide. |
| Viewing Diagnosis Files | SAP HANA provides a variety of traces that help in obtaining detailed information about database actions for troubleshooting and error analysis. These traces can be configured in either the SAP HANA Database Explorer or the SAP HANA Studio. Administrative rights, specifically the SYSTEM PRIVILEGE TRACE ADMIN, are required. |
| Traces | SAP HANA provides a variety of traces that help in obtaining detailed information about database actions for troubleshooting and error analysis. These traces can be configured in either the SAP HANA Database Explorer or the SAP HANA Studio. Administrative rights, specifically the SYSTEM PRIVILEGE TRACE ADMIN, are required. |
| Troubleshooting an Unresponsive SAP HANA System | If a HANA system cannot be reached by SQL or is performing poorly, tools are available to help diagnose the cause of the problem. For situations where a system cannot be reached by SQL or performance issues occur, tools are available to help you or an SAP support engineer access diagnostic information and take emergency action to resolve the situation. |
Traces
| Database-Trace | Always active, this trace records general activities in SAP HANA’s components or specific user or client operations. Error situations are logged in alert trace files. |
| SQL-Trace | Collects information about all SQL statements executed on the index server. Information collected by the SQL trace includes the total execution time of each statement, the number of records affected, potential errors (e.g. violations of unique constraints) reported, the database connection used, etc. The SQL trace is a good starting point to understand executed statements and their potential impact on overall application and system performance and to identify potential performance bottlenecks at the statement level. |
| Expensive Statement Trace | Records information about individual SQL statements whose execution time exceeds a configured threshold. If, in addition to activating the trace for expensive statements, you also activate memory tracking per statement, the trace for expensive statements also displays the maximum memory size used to execute the expensive statements. |
| Plan-Trace | Visualises the execution plans of SQL SELECT statements for an in-depth analysis of query performance. |
| Deadlock-Detection | Creates a waitgraph file that contains thread information about deadlocks. From the SQL command line, you can use the ALTER SYSTEM CREATE WAITGRAPH command to create a waitgraph file that contains thread information about deadlocks. Full details of the syntax can be found in the SAP HANA SQL Reference Manual, where usage and optional configuration steps are explained with some examples to illustrate the essential functions. RESOURCE_ADMIN authorisations are required to execute this command. You can monitor the progress of the job in the monitoring view M_JOB_PROGRESS. |
| Performance-Trace | Records performance indicators of individual query steps in the database kernel for detailed performance analysis by SAP support. The information collected includes the processing time required in a particular step, the data size read and written, network communication and information specific to the operator or processing step (for example, the number of records used as input and output). The performance trace can be activated simultaneously in several client databases in order to analyse cross-departmental queries. |
| Kernel-Profiler | Creates a profiler trace for detailed performance analysis by SAP support. For example, the kernel profile collects information about frequent and/or costly execution paths during query processing. It is recommended to start kernel profiler tracing immediately before executing the statements to be analysed and to stop it immediately after completion. This avoids the unnecessary recording of irrelevant statements. It is also advisable as this type of recording can have a negative impact on performance. |
| System-Dump | Creates one or more runtime dumps when requested by SAP support to understand the behaviour of SAP HANA in a problem situation. |
| SAP Web Dispatcher HTTP-Trace | Analyses HTTP requests. The internal web dispatcher of HANA is an implementation of the NetWeaver web dispatcher. The support component ID for the Web dispatcher is: BC-CST-WDP. For more detailed information, you can refer to the SAP Web Dispatcher and NetWeaver documentation by using the links provided below under “Related Information”. |


