This wiki content has been moved to the SAP Solution Manager 7.2 expert portal. Any child pages of this wiki are deprecated and no longer maintained.
Before starting the managed system setup of the SAP HANA system in SAP Solution Manager, you have to perform several steps in SAP HANA as well as on the operating system level to make sure your SAP HANA system is reported correctly to the Landscape Management Database of SAP Solution Manager and the SAP HANA database can be connected to SAP Solution Manager successfully.
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.
Setup Steps on SAP HANA Database Level
Create Monitoring User in SAP HANA Database
To be able to access monitoring information inside HANA and to connect HANA to DBACOCKPIT in Solution Manager, we need a database user in the SAP HANA database.
Create a new user in HANA:
Make sure that you assign the roles MONITORING and PUBLIC to the user.
If you are running a newer HANA system with an embedded statistics server the role MONITORING will not be sufficient to run the HANA procedures that run to collect the information. The SAP Solution Manager database user needs additional rights to execute the necessary procedures in the _SYS_STATISTICS schema. See SAP note 1917938 for details.
If you want to collect the HANA metrics for SAP liveCache (metric IDs 900+) you also have to add the role DBA_COCKPIT to the user.
Use HANA Studio to log on the HANA with this user for the first time, to change the initial password to a production password.
You also should make sure that the password of this user doesn’t have to be changed anymore. This can be done using this SQL command.
ALTER USER <MONITORING USER> DISABLE PASSWORD LIFETIME
See also SAP note 1702224 for details.
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 defaul, 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.
Setup Steps on the SAP HANA Host
Install Diagnostics Agent and SAP Host Agent on SAP HANA hosts
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.
Diagnostics Agent Installation
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:
Additionally, the SAP Host Agent status can be checked in the Agent Administration under the tab "SAP Host Agent".
Required SAP Host Agent Version
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.
Setup HDB User Store for SAP Host Agent
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 surounded 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<sql port> <hana-master-host>:<sql port> MONITOR password
The configuration is also described in SAP note 1625203.
Alternatively, a new method of setting the hdbuserstore can be used (recommended approach). The advantage of this call is, that the monitoring user will be created automatically with the required roles.
See SAP note 2023587.
To check your setup, run the command:
/usr/sap/hdbclient/hdbuserstore LIST <SID>SAPDBCTRL
The output should look like this:
You can check the WebService used by SAP Host Agent.
Run the command:
/usr/sap/hostctrl/exe/saphostctrl -function GetDatabaseStatus -dbname <SID> -dbtype hdb
Register HANA in SLD
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.
Adjust SAP HANA SLDSYSTEMHOME
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:
- If your HANA runs under an ABAP system, the ABAP system most likely knows the external HANA hostname. This doesn’t match the internal HANA hostname and hence the SystemHome of the ABAP system and its HANA DB will not match in LMDB. Since the SLD data supplier in RZ70 also reports a HANA DB you will see 2 HANA DBs in LMDB, one with the internal and one with the external hostname. This is undesirable.
- If you run a multi-node HANA DB (Scale-Out) the hostname on which the indexserver runs in MASTER role can change. A scale-out SAP HANA system can be installed with multiple hosts (multiple nodes). The indexserver can only run in MASTER role on only one of these hosts at a time. The actual master indexserver is assigned on the same host as the nameserver with the actual role MASTER (this is not a mandatory requirement for HANA MDC, as multiple master indexservers could exist, running on different hosts). The host for the nameserver in MASTER role is designated during startup. Now if the host with the master indexserver fails, the all services will fail over to another host in the scale-out (preferably a standby host, but will take whatever he can get). This called Host Auto-Failover (for more details please refer to SAP Help or this document in SDN). When this happens the hostname of this host is now reported for SystemHome during the next SLD data supplier run and a new SAP HANA technical system is hence created in SLD and LMDB. This would render all your setup pretty much useless. This is also undesirable.
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:
HANA 2.0 SPS02 Rev23: 2.00.023
HANA 2.0 SPS01 Rev04: 2.00.012.04
HANA 1.0 SPS12 Rev16: 1.00.122.16
SLD Registration using HDBLCM (SAP HANA >= SP08)
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:
- he hdblcm executable is console-based
- the hdblcmgui is GUI-based
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:
- change the value of parameter nameserver.ini [sld] enable = from 'true' to 'false'
- change the value back to 'true'
You can check the success of the SLD registration and find any error that might occurred in the sldreg.log that you can access via HANA Studio.
Make sure that you find a success message in the log.
SAP HANA database Revision 110 - 122.01
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 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.
Setup Steps on the SAP Solution Manager Host
Install client software on SAP Solution Manager
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 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 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 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
Set DB parameter on Solution Manager
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 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 Solution Manager.
HANA post-upgrade activities
In case of HANA 1.0 to HANA 2.0 upgrade (which has been already previously connected as managed system and monitored by Solution Manager/Focused Run) following post activities are required:
1. Adjustment of hdbuserstore is required due to introduction of MDC as of HANA 2.0.
Reason: failed hdbconnectivity as the KEY for the System DB does not exist yet and the KEY for the tenant needs to be adjusted.
Solution: Refer to the note (2621457 - hdbconnectivity failure after upgrade to 2.0).
2. Reason: After the upgrade the old product version of HANA 1.0 still remains in the LMDB.
Solution: Execution of clean up LMDB report (2734260 - Repair LMDB data for HANA system after HANA Upgrade).
3. Perform the Managed System Configuration and System Monitoring for SYSTEM DB in the same way as for a single DB.
4. Re-execute the Managed System Configuration and System Monitoring for the tenant DB.