SAP HANA Database

This page explains how to prepare a SAP HANA database for the connectivity to SAP Focused Run.

Currently the following monitoring application are supported for SAP HANA databases:

Preparations in the Managed Database

TaskActions
Preparation Tool (optional)In order to automate certain tasks, you can use the Preparation Tool
Install SAP HANA DB version 80 or higher

You need at least SAP HANA DB version 80, optionally install the latest SAP HANA and latest Patches from Software Downloads.

Install SAP Note 2378916

Run Outside Discovery on the HostSet SAP HANA Network configurations according to SAP standard recommendationsFor example, host names of HANA-replicated DBs need to be unique.

SAP HANA SLD Parameterization

Correct SLDSYSTEMHOME SLDVIRTDBHOME (certain use cases) of HANA DB need to be sent with SLD

As SAP HANA <DBSID>adm user, at OS level:

Configure the HANA Technical System default.pfl profile parameters for SLDSYSTEMHOME and SLDVIRTDBHOME (only in case of replication scenarios) to match with the database identifier of technical systems using this HANA system. SLDVIRTDBHOME needs to be set on all SAP HANA DB clusters in the replication scenario to the same value as reported by the ABAP or JAVA system using this SAP HANA DB as database (virtualized DB host name). SLDSYSTEMHOME is to be set in order to ensure that it makes no difference which host is the master host in a SAP HANA scale out system and it needs to be set to the same value as reported by the ABAP or JAVA system using this SAP HANA DB as database (when replication and virtualized DB host name is used). If set incorrectly, SAP HANA needs to be restarted.

This should be a regular post-installation task, however, if it is not executed correctly at installation, it needs to be adapted. 

Usage of SLD relevant parameters in the global.ini

As of HANA revisions mentioned below, the recommendation is to set the parameters sldsystemhome and sldvirtdbhome in the global.ini instead of DEFAULT.PFL. This has one big advantage - the parameters can be applied dynamically, means no HANA restart required.

To do so, please add them under the section [system_landscape_hostname_virtualization].

sldsystemhome as of HANA 1.00.122.16, 2.00.012.04, 2.00.023 and higher.

sldvirtdbhome as of HANA 1.00.122.13, 2.00.012.02, 2.00.020 and higher. 

For HANA SR running on scale-out and/or by specifying any other values than internal hostnames (e.g. tenant specific) for sldsystemhome in a SR setup, consider to add an entry under [system_landscape_hostname_resolution] for all internal host names in the SR landscape on all sites! As a value have to enter the value from sldsystemhome of the particular SR site.

Example 1: 2-Tier System Replication with scale-out setup

  • SiteAHost1 = SiteAHost1
  • SiteAHost2 = SiteAHost1
  • SiteBHost1 = SiteBHost1
  • SiteBHost2 = SiteBHost1

Example 2: 3-Tier System Replication with tenant specific sldsystemhome values

  • SiteAHostName = SomeValueSiteA
  • SiteBHostName = SomeValueSiteB
  • SiteCHostName = SomeValueSiteC

Background: this parameter is required to ensure that each SR site can resolve the host name of other sites.

There is one more parameter which is called enable_virtdbhome. This parameter is responsible for the association between the virtual and physical databases. Once the sr_register command is executed, a secondary system will be registered with a primary system. This results in a parameter change enable_virtdbhome = yes for the primary and = no for the secondary system. Such a parameter change is done automatically (e.g. every time when a take over is executed) and in most of the cases does not require a manual adjustment.

This parameter (enable_virtdbhome) has been introduced with the following HANA revisions:

  • HANA 2.0 SPS02 Rev00  2.00.020
  • HANA 2.0 SPS01 Rev02  2.00.012.02
  • HANA 1.0 SPS12 Rev13  1.00.122.13

 Therefore, if the minimum required revision is installed, please check if the parameter really exists in nameserver.ini (section 'sld') and has the correct value as mentioned above.

SAP HANA Replication ScenariosFor SAP HANA revisions < 122.04 the handling of SAP HANA replication scenarios is not complete in the SAP HANA SLD data supplier and therefore manually adding of replication and virtual DB links in LMDB of Solution Manager is required. See section: manual adjustment of LMDB for SAP HANA replication scenarios.
Check if an SLD Data Router (SLDR) is neededAs prerequisites, you need to choose, according to your landscape, if an SLDR is required see page Preparing System Landscape Data Router.

Check Needed Data Suppliers

The SAP HANA DB can be used in stand-alone or associated to an ABAP or Java Stack

The SAP HANA DB can be used in stand-alone or associated to an ABAP or Java Stack. Therefore, the corresponding Data Supplier needs to be setup. See the SAP NetWeaver Application Server ABAP Preparation or SAP NetWeaver Application Server Java Preparation pages.

Note: To ensure that the Database supplied by the ABAP Data Supplier fits to the Database reported by the HANA Data Supplier, you shall set the parameter SLDSYSTEMHOME on the ABAP / JAVA Stack to the value of VIRTDBHOME (or SLDSYSTEMHOME) of the HANA Database.

In case you plan to use FQDN for the above mentioned parameters, consider the limitations in SAP Note 2607076.

Data Supplier

SAP HANA Database provides its own Data Supplier (SAP HANA Database Data Supplier)

HANA SLD Registration can be done in two ways:

1-Using HANA Studio:

Open the SAP HANA database lifecycle manager (HDBLCM) to configure the HANA SLD DS connection parameters (namserver.ini and Connection credentials) for the system registration in SAP Focused Run. This can be done via command line interface or Graphical User Interface. Check the SAP HANA Administration Guide in the "Configuring HANA System to Connect to the SLD" section.

Note: The Payload can be send also by switching the "nameserver.ini" parameter "SLD Active" in the HANA Studio.

2- Using the "hdblcm" command command line. Example As <sid>adm user, or root user, at OS level:

  • Generate slddest.cfg file by running: /hana/shared/<SID>/hdblcm
  • Choose Option 5 "configure_sld" and provide SLD parameters
  • If hdblcm was executed the first time, the Datatransfer is triggered immediately. If an existing configuration is changed, the data will be send within the next 12 hours.
  • Check the slddest.cfg: /usr/sap/<DBSID>/SYS/exe/hdb> sldreg -showconnect /usr/sap/<SID>/SYS/global/slddest.cfg
  • Restart the service to send the payload /usr/sap/<DBSID>/HDB<inst>/exe> sapcontrol -nr <instance> -function RestartService
  • Data transfer result  can be checked in sldreg.log located in the trace directory of the HANA installation.

See also the HANA Troubleshooting Guide

Create SAP HANA monitoring user and provide connection credentials.

SAP Focused Run uses SAP Host Agent Web methods to get DB monitoring data. 

Create a SAP HANA user on DB level with proper authorizations and maintain the hdbusertore with associated credentials.

You need to first confirm whether your SAP HANA Technical System it is based on a single DB, or part of a Multi Database Container (MDC) and this either on a system DB or on a tenant DB. If you are unsure, use one of the following ways to determine the type:

First of all in the HANA studio you see SYSTEMDB@<SID> for a system DB in a MDC, or you see <DBNAME>@<SID> for a tenant DB in a MDC.

If needed, you can also look-up the SAP HANA Technical System definition using the LMDB (Object Maintenance) from the Launchpad your SAP Focused Run system, since the SLD Data Supplier registration was already performed (see previous task). When you visualize the Technical system in LMDB, press the Details button.

When selecting the tab Properties, search for the property IsSystemDB. The value will be false for a single DB (and also for a tenant DB in a MDC).

Also you can select the tab Associated Instances, and sort on the Associations. If there is an association SAP_HDBSystemSubDatabase, then it is part of a MDC.

The SAP Host Agent provides a method to create this user and maintain the hdbuserstore within one single OS command. See also SAP Note 2023587.

 

Depending on the SAP HANA DB type:

  • For single DBs, or SYSTEMDB of a Multi Database Container (MDC):

Run OS command in context of user sapadm:

/usr/sap/hostctrl/exe/saphostctrl -dbname <SID>-SYSTEMDB -dbinstance HDB<instnr> -dbtype hdb -dbuser SYSTEM -dbpass <dbpassword> -function SetDatabaseProperty DBCredentials=SET -dboption User=SAPDBCTRL -dboption Password=<desiredPassword>

Note: In the hdbuserstore the following key will be updated: <SID>SAPDBCTRL

  • For tenant DBs of a Multi Database Container (MDC):

Run OS command in context of user sapadm: 

/usr/sap/hostctrl/exe/saphostctrl -dbname <DBNAME - Like displayed in HANA Studio>  -dbinstance HDB<instnr> -dbtype hdb -dbuser SYSTEM -dbpass <dbpassword> -function SetDatabaseProperty DBCredentials=SET -dboption User=SAPDBCTRL -dboption Password=<desiredPassword>

Note: In the hdbuserstore the following key will be updated: <SID>SAPDBCTRL<TenantSQLPort>

The <TenantSQLPort> is usually 30<instnr>41 for the first installed tenant, and 30<instnr>44 for the second, and so on.

In case this MDC was migrated from a single DB, then the <TenantSQLPort> for the first tenant DB is usually 30<instnr>15 as it keeps the port that had been used before the migration.

Options to Achieve Automation

Performed either manually or in OS script

  • Central SAP HANA user management
  • Local or remote call of SAP Host Agent function SetDatabaseProperty.
Switching the monitoring data collection mechanism (highly recommended)
Deploy system analysis data collectors

Download and deploy custom operation from SAP Note 255664. In order to get them installed you need to unpack the the file from this note using the user root into the directory /usr/sap/hostctrl/exe/operations.d on each host of the HANA DB system.

Example: Assuming the attachment file was copied to /tmp this can be done via the following shell command sequence:

  • cd /usr/sap/hostctrl/exe/operations.d
  • tar -xzvf /tmp/HANA_SQL_OPERATIONS.tar.gz
SAP HANA Webdispatcher Parameterization (since SAP Focused Run 1.0 FP01).

Since SAP Focused Run 1.0 FP01, the RUM Application is able to monitor XS Traffic.

Configure the HANA Webdispatcher from HANA Studio like following:

  • Open the configuration tab
  • Select the webdispatcher.ini parameter
  • Drilldown to profile
  • Right Click and select "Add Parameter"

icm/HTTP/logging_0 = PREFIX=/, LOGFORMAT=%t %h %u - "%r2" %s %b %L epp[%{sap-passport}i] fesr[%{SAP-Perf-FESRec}i] fesropt[%{SAP-Perf-FESRec-opt}i],  LOGFILE=$(DIR_INSTANCE)/trace/http_fe.log, MAXSIZEKB=25000, SWITCHTF=day, FILEWRAP=on

Review SAP Note for latest metric definitions (optional) 

If a specific metric is missing or there are issues with the existing set of HANA metrics, please review SAP Note 2422465.
Post-upgrade activities after HANA 1.x to HANA 2.x upgrade  

In case of HANA 1.0 to HANA 2.0 upgrade please perform the following steps: 

  • Adjustment of hdbuserstore (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).
  • Removal of obsolete LMDB entries. 
    Reason: After the upgrade the old product version of HANA 1.0 still remains in the LMDB.
    Solution: Execution of clean up LMDB report (2733868 - Repair LMDB data for HANA system after HANA Upgrade).
  • Perform the Simple System Integration for SYSTEM DB.
  • Re-execute the Simple System Integration for the tenant DB.
Monitoring of SAP HANA XSAThe relevant steps can be found under the section SAP HANA XS Advanced on Preparing Managed Systems page.