Remote Monitoring of HANA Database from Solman

Estimated read time 6 min read

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

 

 

 

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 :

System DB

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′

4. Setup HDBUSERSTORE for the Monitoring User

Execute the above command with SIDadm user.

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

Check existing keys available.

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:

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.

./hdbuserstore SET Q02SAPDBCTRL dbbwq02:30013 USER PASSWORD

Tenant DB:

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

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

Host Agent successfully retrieves HANA DB details

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

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

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

5. Register HANA DB in SLD

HANA DB is registered in SLD using hdblcm.

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

Choose 5.

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

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.

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.

8. Perform Managed System Configuration

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

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.

 

 

​ 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 DBIf 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 hostOnce 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   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 :System DBOnce 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’4. Setup HDBUSERSTORE for the Monitoring UserExecute the above command with SIDadm user.Path : /usr/sap/SID/SYS/exe/hdbCheck existing keys available.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:Password is masked in REDThe port used in the above command is the SQL Port of System DB.The SQL Port can be found in HANA Studio under Landscape../hdbuserstore SET Q02SAPDBCTRL dbbwq02:30013 USER PASSWORDTenant DB:Same as above, only the Key name, SQL port and user details changes.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 hdbHost Agent successfully retrieves HANA DB detailsdbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseSystemStatus -dbname Q02@Q02 -dbtype hdbdbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseProperties -dbname Q02 -dbtype hdbdbbwq02:/usr/sap/hostctrl/exe # ./saphostctrl -function GetDatabaseStatus -dbname Q02 -dbtype hdb5. Register HANA DB in SLDHANA DB is registered in SLD using hdblcm.dbbwq02:/hana/shared/Q02/hdblcm # ./hdblcmChoose 5.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.xml6. Review SLD and LMDB ContentVerify 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.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.8. Perform Managed System Configuration Go to SOLMAN_SETUP and choose managed system configuration and select the System ID for HANA DB.Ensure that the used DB-Connect String and DB-Connect String in LMDB are the same.9. Assign Templates for MonitoringAssign HANA DB templates to both system and tenant DBs.    Read More Technology Blogs by Members articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author

+ There are no comments

Add yours