## 5 SAP HANA Database monitoring with Solution Manager
This topic gives information about SAP HANA database monitoring with Solution Manager.
## Setting up Solution Manager
SAP Solution Manager can be used to monitor one or more SAP HANA databases. A starting point to find all the information you require for the setup and configuration of the SAP HANA database monitoring using solution manager can be found on the WIKI page SAP HANA Operations with SAP Solution Manager
A detailed step by step description of the configuration and setup is given in the WIKI subpage Managed System Setup for SAP HANA , the configuration and setup have different steps depending on the SAP HANA database architecture and environment you have, for example, you may have Multitenant Database Containers (MDC) and/ or system replication may be enabled in your environment.
There are two main steps:
1. You need to register the SAP HANA system you want to monitor in SLD
2. You need to do the managed system configuration steps for the HANA Database in the solution manager system.
The Resolution part of the KBA 2436986 - Registration and Managed System Setup of SAP HANA in SAP Solution Manager links you to the correct steps to follow depending on your HANA Architecture.
## Troubleshooting when registering an SAP HANA Database in SLD
Before starting troubleshooting please double check that you have done the required configuration on the SAP HANA database side and that you are aware of known documented issues. For this please refer to the SAP HANA Database Administration Guide that is relevant for your HANA release and the notes referenced below:
In the SAP HANA Administration guide see the section Configuring a SAP HANA System to Connect to the System Landscape Directory (SLD) .
If you are following the documentation above and the SLD registration is not successful please then check the steps in the Resolution part of the KBA 2537537 - SLD does not update after registering HANA using HDBLCM .
If you still face a problem with the registration of the SAP HANA database in SLD please review the known issues described in the below notes as they may be relevant for the issue that you face:
## Important Notes for SAP HANA SLD Registration:
- 2729787 - FAQ: HANA Data Supplier for System Landscape Directory (SLD) and Focused Run (FRUN)
- 2697518 - Patch Level in LMDB and SLD show the HANA DB Service Pack Number and not its Patch Level
- 2688902 - LMDB Shows Invalid Instance and Version Information for Products Installed on a SAP HANA
- 2607076 - Support of SLD Registration of an SAP HANA System Using Fully Qualified Domain Names (FQDN) in SLDSYSTEMHOME and SLDVIRTDBHOME
- 2646035 - SLD Registration: The Former Primary Site of a System Replication Still Show the old Values in SLD and Solution Manager After a Takeover
- 2577511 - Support of SLD Registration of a HANA System Replication or Multi Database Container Setup .
If you are not successful in resolving the problem with the above information, SAP Support would require the following tracing and logs to further analyse issue:
## Log files required for SAP HANA Database SLD registration problems
MDC Environment:
1. Increase the trace level on SYSTEMDB by executing the following SQL:
2. Trigger the SLD data supplier by executing the following sql on SYSTEMDB:
3. Reset the trace level on SYSTEMDB to default:
4. Create a full system info dump of SYSTEMDB ( 1732157 - Collecting diagnosis information for SAP HANA [VIDEO] )
5. Provide the files slddest.cfg, sldreg.log and sldreg.xml from the HANA server:
```
alter system alter configuration('nameserver.ini','SYSTEM') SET ('trace','sldconfig') = 'debug', ('trace','sldcollect') = 'debug', ('trace','sldsend') = 'debug' with reconfigure;
```
```
alter system alter configuration ('nameserver.ini','SYSTEM') SET ('sld','enable') = 'false' with reconfigure; alter system alter configuration ('nameserver.ini','SYSTEM') SET ('sld','enable') = 'true' with reconfigure;
```
```
alter system alter configuration('nameserver.ini','SYSTEM') UNSET ('trace','sldconfig'), ('trace','sldcollect'), ('trace','sldsend') with reconfigure;
```
```
/usr/sap/<SID>/HDB<instance>/<host>/trace/sldreg.xml sldreg.log/usr/sap/ <sid>/SYS/global/slddest.cfg
```
Additionally, from every HANA host on primary and in case of a system replication environment from every host on secondary side:
```
/usr/sap/<SID>/profile/DEFAULT.PFL
```
6. Provide the content of the global.ini file by executing the sql command on SYSTEMDB and every tenant DB. Provide the result as .csv file Select * from sys.m_inifile_contents where file_name = 'global.ini' and layer_name = 'SYSTEM';
What information is captured in the above SAP tracing?
nameserver.ini . >= [trace]:
| Trace                | Detail level                                                        |
|----------------------|---------------------------------------------------------------------|
| sldcollect = 'debug' | lists every step of the data collection                             |
| sldconfig = 'debug'  | lists the initial registration to SLD done by hdblcm                |
| sldsend = 'debug'    | lists the path to the log file sldreg.log of the last data transfer |
## Managed system configuration of the SAP HANA Database in Solution Manager
To perform the second step: managed system setup of the SAP HANA Database in solution manager please refer to the following section of the SAP HANA Administration guide:
## Connecting SAP Solution Manager to SAP HANA
Additional troubleshooting information for the SLD registration and the managed system setup of the SAP HANA database in solution manager is available in the Wiki Trouble Shooting Guide for SAP Solution Manager Operations for SAP HANA
Please be aware of the below knowledge repositories that described common issues and questions that come up when using Solution Manager to monitor SAP HANA databases:
## Important KBAs and Notes related to Solution Manager and HANA monitoring:
- 2374090 - SOLMAN_SETUP - BW Content Activation fails "ERROR: EC:2048" column store error: in Solution Manager 7.2
- 2264627 - How to Troubleshoot Grey HANA Metrics in Technical Monitoring - SAP Solution Manager
- 2711824 - High Number of Prepared Statements Causing High Usage of Memory Allocator Pool/ Statistics
- 2211415 - SAP HANA alerting composite SAP Note
- 2147247 - FAQ: SAP HANA Statistics Server
- 1991615 - Configuration options for the Embedded Statistics Service
Technical requirements for setting up secondary database connection from Solution Manager to SAP HANA Database:
- 1597627 - SAP HANA connection
## Important changes regarding how Solution Manager collects monitoring information from SAP HANA Database:
With SAP HANA Revisions >== 122.02 the method used by Solution manager to collect the alerting relating information from a manged SAP HANA Database has been changed and optimized in such a way that it reduces the workload on the SAP HANA Database for the statistics collection. To use this new HANA Monitoring mechanism changes may be required on the solution manager system and the SAP HANA Database, further information can be found in the SAP note 2374272 - Enabling new HANA Monitoring mechanism for Solution Manager
## Monitoring Recommendations
You observe differences in parameter value recommendations coming from a solution manager generated EWA report, HANA Parameter check script HANA_Configuration_Parameters_1.00.90+.txt script from KBA 1969700 - SQL Statement Collection for SAP HANA and/or EWA workspace tool (ewaviewer) . The root cause is often that the EWA report generated from a customer's solution manager system does not have the latest information on the parameter value recommendations due to outdated version of solution manager system or ST-SER Release installed. Further information is available in the KBA: 2749491 - Differences in EWA report for HANA Parameter recommendations when compared with output of HANA parameter check script HANA_Configuration_Parameters_1.00.90+.txt