The following steps are independent of your SAP Solution Manager release. However, some of the parameters might not be known to older SAP Solution Manager releases. We will highlight this accordingly.
The steps below have to be performed no matter how the SAP HANA system is deployed. However, there might be some differences in the steps for SAP HANA MDC and SAP HANA systems with SR. These differences will be highlighted in the respective sections of this article.
To be able to access monitoring information inside HANA and to connect HANA to DBACOCKPIT in SAP Solution Manager, we need a database user in the SAP HANA database.
SAP HANA MDC Systems
Please note that such a monitoring user has to be created an each tenant and for the SYSTEM-DB for SAP HANA systems with multi-tenancy database containers.
It is very important that the monitoring can collect data all the time, even if the system is under high load, as the monitoring is the only way to notice such a high load situation and get alerted. To make sure that the monitoring user can collect data all the time, it is recommended to give this user a high priority. The priority for users ranges from 0 to 9 with the default value 5. You should set the priority for the monitoring user to something higher than the default, e.g. 8.
To do this run the SQL statement:
ALTER USER <MONITORING USER> SET PARAMETER PRIORITY = '8'
See SAP Note 2222250 for details on HANA Workload Management.
To successfully discover and monitor the SAP HANA database and the SAP HANA database hosts you have to install a SAP Diagnostics Agent and a SAP Hostagent on each host of the SAP HANA database.
As of SAP HANA SP09 or higher or if you do not have access to the HANA installation media for SAP HANA SP08 or older, you install the agent manually. For instructions on the manual installation of the Diagnostics Agent see SAP note 1833501.
The SAP Host Agent will be installed during the installation of the Diagnostics Agent. Also the necessary trusted relationship between the SAP Host Agent and the Diagnostics Agent will be set up.
If you install the Diagnostics Agent manually you should install it with the internal HANA node hostname. If you install it with the physical hostname, you have to activate an on-the-fly agent for the internal HANA node hostname later on.
Please don't forget to patch the SAP Host Agent after the installation. The SAP Host Agent is delivered with a specific patch in the installation sources for the Diagnostics Agent. This is not necessarily the latest version. Follow SAP note 1473974 to set up the auto upgrade functionality for SAP Host Agent.
The Diagnostics Agent is updated automatically by SAP Solution Manager.
To check if the installation of the Diagnostics Agent was successful, please make sure the agent is connected to SAP Solution Manager using the Agent Administration:
In SAP Solution Manager 7.2 a newly installed agent will appear on the tab "Non-authenticated Agents". This means that the agent is successfully connected, but not yet available for applications. To do so, please first force an update of the SMD Agent software, then trust an agent to finalize the agent connection. Afterwards, it will appear under "Connected Agents".
Additionally, the SAP Host Agent status can be checked in the Agent Administration under the tab "SAP Host Agent".
For SAP HANA monitoring the SAP Host Agent uses the binary SAPDBCTRL. To make sure this works without problems the minimal required patch level for SAP Host Agent in Patch 183. Refer to section 'Upgrading SAP Host Agent' of the 'Diagnostics Agent Maintenance Procedures' WIKI page for information about how to update the SAP Host Agents of the HANA servers.
By setting up the HDB User store for the monitoring user in the SAP HANA database, you enable the SAP Host Agent to connect to HANA and receive database status and also database process status information. You need to set up the HDBUSERSTORE on each host of the SAP HANA database.
Log on as <sid>adm to OS level and run the command:
/usr/sap/hdbclient/hdbuserstore SET <SID>SAPDBCTRL <hana-master-host>:3<Sys-No>15 MONITOR password
In newer installations you will find the hdbuserstore executable in the folder /hana/shared/<SID>/hdbclient.
If you have a multi-node HANA database, please add all possible <hana-master-nodes> separated by semicolon surrounded by "".
/usr/sap/hdbclient/hdbuserstore SET <SID>SAPDBCTRL "<hana-master-host1>:3<Sys-No>15;<hana-master-host2>:3<Sys-No>15" MONITOR password123
For a HANA tenant DB the command looks like this:
SET <SID>SAPDBCTRL<indexserver port> <hana-master-host>:<indexserver port> MONITOR password
The configuration is also described in SAP note 1625203.
To check your setup, run the command:
/usr/sap/hdbclient/hdbuserstore LIST <SID>SAPDBCTRL
You can check the WebService used by SAP Host Agent.
Run the command:
/usr/sap/hostctrl/exe/saphostctrl -function GetDatabaseStatus -dbname <SID> -dbtype hdb
The last step on the SAP HANA server is to register HANA in SLD. If your HANA is running under an ABAP stack in the Business Suite you might see a HANA database in the SLD already. But be careful, this might be the HANA which is reported via the SLD data supplier in the ABAP's RZ70. This has only very rudimentary data and is by far not enough.
SAP HANA Systems with SR
The SLD registration for SAP HANA systems with System Replication requires some additional parameters and setup steps. Please refer to the section SLD registration of SAP HANA SR systems on this page.
There are also considerations regarding the hostname, which is reported for HANA to the SLD. Per default the internal hostname on the host currently running the indexserver in MASTER role is reported as “SystemHome”. This is OK for single-node HANA databases that are not used by an ABAP system.
If you run a multi-node (Scale-out) HANA or your HANA runs under an ABAP system, that hostname is not recommendable. This is for 2 reasons:
To address this, you can set the hostname with which HANA registers to the SLD using the parameter SLDSYSTEMHOME in the SAP HANA DEFAULT.PFL.
For case 1: The recommended value is the external HANA hostname as known by the ABAP system that is using this HANA DB This parameter is the SAPDBHOST parameter in ABAP.
For case 2: If your scale-out system runs under a SAP ABAP system, please refer to case 1. If you run a Scale-out SAP HANA scenario without SAP ABAP you may set SLDSYSTEMHOME to the hostname of the host which is during the installation configured to run the MASTER indexserver. Basically the main MASTER node of the entire SAP HANA DB.
Please also refer to SAP note 1842630 - Reconciliation of HANA and ABAP/Java SLD Data Supplier for details.
Check the profile parameter SAPDBHOST in transaction RZ10 of the ABAP system.
To find out what the current host is that runs the indexserver in MASTER role you can check HANA Studio. The column "Nameserver Role (Configured)" would indicate which one of the hosts was installed first (MASTER1). However, you can basically choose the hostname of any the hosts that can become a master for the profile parameter.
To set the parameter, log on to the HANA host on OS level and adjust the DEFAULT.PFL of the HANA database. The DEFAULT.PFL for HANA is located under /usr/sap/<SID>/SYS/profile (or just use command cdpro as <sid>adm to jump there). This directory should be shared between all HANA nodes of the HANA DB system.
Add the parameter SLDSYSTEMHOME=<SAPDBHOST known in RZ10> or <MASTER hostname> to the profile.
You have to restart HANA for the parameter change to take effect.
As of SAP HANA revisions mentioned below, the recommendation is to set the parameter SLDSYSTEMHOME directly in the global.ini instead of maintaining it in the DEFAULT profile. The values in the global.ini will overwrite those in the DEFAULT profile. This approach has one big advantage - the parameters can be applied dynamically, means no more HANA restart is required.
To do so, please add parameter "sldsystemhome" under the section "[system_landscape_hostname_virtualization]" .
This applies only if the version of SAP HANA revision is at least:
As of SAP HANA SP08 a new lifecycle management tool was shipped and it is not recommended to use HLM anymore. The tool is called HDBLCM and is an OS-level tool.
In standard installations you can find the HDBLCM in the folder: /hana/shared/<SID>/hdblcm
You have two options to open the tool:
The hdblcm is useful, if you don't have X server available, to open the GUI-based version.
To start the HDBLCM please run the executable of your choice, logged on with a <sid>adm user.
Select the index for the SLD registration (option 3 in the console-based tool).
Enter the SLD registration parameters below and run the registration:
|SLD Host Name||Specifies the name of the host where the SLD system is installed.|
|SLD Port||Specifies the standard HTTP access port of the SLD.|
|SLD User Name||Specifies the user of the SLD system.
It must be a user that already exists on the host where the SLD system is running.
|SLD Password||Specifies the password for the SLD system.|
|Specifies whether or not to use HTTPS.|
After the connection parameters are stored, the registration of SAP HANA system needs to be pushed towards specified SLD. To trigger an execution immediately instead of waiting for an automatic run (per default the data is sent every 12 hours), following steps can be performed:
SAP HANA database Revision 110 - 122.01
With SAP HANA database Revision 110 - 122.01 there is a bug in the SLD data supplier that leads to an incorrect entry in the sldreg.xml. Please refer to SAP note 2303938 for a currently manual workaround.
SAP HANA MDC Systems
The SLD registration is performed by the nameserver. As this is a shared services you only have to run the SLD registration once for the SYSTEM-DB of your SAP HANA MDC system. If your MDC system runs on several hosts and you have the master nameserver of the SYSTEM-DB configured to fail over it is recommended to set the parameter SLDSYSTEMHOME in the global.ini of the HANA SYSTEMDB (if this cannot be done due to the lower revision mentioned above, please set it in the DEFAULT profile).
You will notice that you only can access the sldreg.log as well as the SLD parameters on the nameserver from the SYSTEM-DB. This is correct. The SYSTEM-DB takes over the registration for itself and all HANA tenants.
You can find HANA in the SLD of SAP Solution Manager under Administration → Content Maintenance → HANA Database System.
Make sure that your HANA Database System has more than just 2 associations. 2 associations indicate that this HANA system was reported by the RZ70 SLD data supplier and is incomplete.
SAP HANA MDC Systems
For SAP HANA MDC systems you will find the SYSTEMDB as well as all tenants.
You also see that the SYSTEMDB has much more associations than the tenants. This is because it also has associations that identify which tenants it knows.
To enable SAP Solution Manager to connect to HANA via DBACOCKPIT you have to install the HANA client software and the HANA libraries on the Solution Manager host if you SAP Solution Manager system is not running on SAP HANA itself.
The procedure is described in SAP Note 1597627. Please change the installation path recommended in this note to: hdbinst -a client -p /usr/sap/hdbclient -s <SID>. Otherwise you might face issues with the path later on. Set the environment variable to the path you used for the installation. Please also note that you have to restart the SAP Solution Manager host to make the path changes required for the client installation take effect.
The libraries needed are part of the SAP kernel. As off kernel release 720 patch 400 and above all DB libraries are included in each SAPEXEDB. Make sure the library dbhdbslib.so is located in the kernel directory of SAP Solution Manager (/usr/sap/<SID>/SYS/exe/run).
The SQL library libSQLDBCHDB.so has to be available in the HANA client directory (/usr/sap/hdbclient).
Remark: In case you installed the HANA client under the path /usr/sap/<SID>/hdbclient and face problems when you try to test the DB connection from SAP Solution Manager, please create a sym-link from /usr/sap/hdbclient to /usr/sap/<SID>/hdbclient with command:
ln -s /usr/sap/<SID>/hdbclient /usr/sap/hdbclient
To avoid performance issues with the DB connection to HANA it is recommended to set the profile parameter dbs/hdb/connect_property in the SAP Solution Manager DEFAULT.PFL profile. See SAP Note 1761693 for details on how to set additional HANA parameter. Set the parameter to:
Further information: In the general HANA settings "Client Distribution Mode" is enabled. This can lead to performance problems in SAP Solution Manager's DB connection to HANA. This concerns mainly scale-out (multi-node) HANA solutions. This parameter changes this behavior for DB connection from Solution Manager to HANA and disables "Client Distribution Mode" for HANA connection from SAP Solution Manager.