In this lesson, you'll learn how to use the Statement Library provided by the SAP HANA database explorer.
As a database administrator, you want to use the SQL statement collection for SAP HANA or want a location to store your personal monitoring scripts. This is possible using the Statement Library provided in the SAP HANA database explorer.
During the analysis of complex problems, you might want to determine special database information that isn't entirely available in standard functions. Because of this, SAP provides a collection of useful SQL statements for SAP HANA database analysis. For information on how to download the SQL statements, see SAP Note 1969700.
The database explorer statement library comes preinstalled with a set of system-defined statements that are available in the M_SYSTEM_INFORMATION_STATEMENTS system view and all statements that are included in the SQL Statement Collection for SAP HANA.
For the newest SQL statement collection file, see SAP Note 1969700: SQL statement collection for SAP HANA.
For the SQL statement collection documentation, see SAP Note 1999993: How-To: Interpreting SAP HANA Mini Check Results.
See the following video for opening the statement library.
In the Statement Library pop-up window, select the SQL script you want to execute, for example, Expensive Statement Analysis (1) and the Execute (2) button.
The script will be executed and the results will be shown in a results screen (3) in the display panel of the screen. To further analyze the results, you can download your results to a flat file and open the results in an editor tool.
Mini Checks Usage
You can use each script separately, but you can use mini checks to execute the most important statements with one call. Use the version that best fits your system environment, so that the most comprehensive set of checks is executed. It's important to know your SAP HANA version number. The embedded statistics server assists you with monitoring the SAP HANA system, collects historical performance data, and warns you of system alerts (such as resource exhaustion). The historical data is stored in the _SYS_STATISTICS schema.
Start the mini check every day so that you know what is going on in your system. If you plan to move your system to a newer version, you can precheck your system with the corresponding version of your target revision.
You can also add you own SQL scripts to the Statement Library, or delete scripts that are no of use to you.