Friday, 14 June 2024

Remote Monitoring of HANA Database from Solman

As I find many SAP HANA databases wrongly configured in Solman for efficient, I felt there's a need to publish the steps I follow for the benefit of many.

#Note All the screenshots are taken by me from my internal system 

1. Install DBSL Libraries for remote monitoring of HANA DB

If Solman and the target database are on different databases, install HANA DBSL libraries on solman host for data collection.

2. Install Diagnostic Agent on HANA DB host

Once the agent is installed, check if the host agent is able to communicate with the diagnostic agent. The Result should be GREEN.

dbbwq02:/usr/sap/hostctrl/exe # ./sapcontrol -nr 98 -function GetSystemInstanceList

Remote Monitoring of HANA Database from Solman

3. Setup Monitoring User in HANA DB ( System and Tenant )

We have to create a DB user in HANA, which is used for communication between Solman and remote HANA DB. The users are to be created without an option to force password change after logon.

The roles, that this user will need are:

Tenant DB:

Remote Monitoring of HANA Database from Solman

System DB

Remote Monitoring of HANA Database from Solman

Once the user IDs are created, we have to make the password not expire.

Also, the priority of the user to be set to 8 and above to ensure, the user will be allowed to communicate under heavy loads as well.

ALTER USER SM_MONITOR DISABLE PASSWORD LIFETIME;

ALTER USER SM_MONITOR SET PARAMETER PRIORITY='8'

Remote Monitoring of HANA Database from Solman

Remote Monitoring of HANA Database from Solman

4. Setup HDBUSERSTORE for the Monitoring User

Remote Monitoring of HANA Database from Solman

Execute the above command with SIDadm user.

Path : /usr/sap/SID/SYS/exe/hdb

Check existing keys available.

Remote Monitoring of HANA Database from Solman

We have to create two keys for system and tenant DBs.

The key name should be of format <SID>SAPDBCTRL for SYSTEMDB and as <SID>SAPDBCTRL<Tenant DB SID>

System DB:

Remote Monitoring of HANA Database from Solman

Password is masked in RED

The port used in the above command is the SQL Port of System DB.

The SQL Port can be found in HANA Studio under Landscape.

Remote Monitoring of HANA Database from Solman

./hdbuserstore SET Q02SAPDBCTRL dbbwq02:30013 USER PASSWORD

Tenant DB:

Same as above, only the Key name, SQL port and user details changes.

Remote Monitoring of HANA Database from Solman

Next, we need to test if the host agent is able to retrieve the HANA database details.

dbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseSystemStatus -dbname SYSTEMDB@Q02 -dbtype hdb

Remote Monitoring of HANA Database from Solman

Host Agent successfully retrieves HANA DB details

dbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseSystemStatus -dbname Q02@Q02 -dbtype hdb

Remote Monitoring of HANA Database from Solman

dbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseProperties -dbname Q02 -dbtype hdb

Remote Monitoring of HANA Database from Solman

dbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseStatus -dbname Q02 -dbtype hdb

Remote Monitoring of HANA Database from Solman

5. Register HANA DB in SLD

HANA DB is registered in SLD using hdblcm.

dbbwq02:/hana/shared/Q02/hdblcm # ./hdblcm

Remote Monitoring of HANA Database from Solman

Choose 5.

Remote Monitoring of HANA Database from Solman

Push data to SLD manually using the config file created using hdblcm.

./sldreg -connectfile /usr/sap/Q02/SYS/global/slddest.cfg -file /usr/sap/Q02/HDB00/dbbwq02/trace/sldreg.xml

Remote Monitoring of HANA Database from Solman

6. Review SLD and LMDB Content

Verify SLD and ensure, we have more than 11 associations for system and tenant DB. This is to ensure all the data from HANA DB is captured by the SLD registration.

Remote Monitoring of HANA Database from Solman

Remote Monitoring of HANA Database from Solman

Remote Monitoring of HANA Database from Solman

7. Use the same SQL port which was used in HDBUSERSTORE setup.

Once saved, go to SE38 and execute report ADBC_TEST_CONNECTION and choose DB connection which was setup now.

Remote Monitoring of HANA Database from Solman

8. Perform Managed System Configuration

Go to SOLMAN_SETUP and choose managed system configuration and select the System ID for HANA DB.

Remote Monitoring of HANA Database from Solman

Remote Monitoring of HANA Database from Solman

Remote Monitoring of HANA Database from Solman

Ensure that the used DB-Connect String and DB-Connect String in LMDB are the same.

9. Assign Templates for Monitoring

Assign HANA DB templates to both system and tenant DBs.

Source: sap.com

No comments:

Post a Comment