HANA Monitoring Multi-tenancy

  

It's complicated.

Have you tried monitoring your HANA multi-tenant environment?  It's harder than it sounds.  In prior posts, we wrote about:

There are previously mentioned issues connecting the SAP HANA Administration Console to the tenant database because specific ports are required.  There's not much documentation about connecting to a tenant for monitoring.  Although most SAP Business Suite on HANA systems use DBACOCKPIT or Solution Manager (see our SAP Monitoring Tools Overview), it is typically connected to a single default tenant or automatically chosen during SAP installation.  

It took a little detective work, but we've unraveled the mystery of how to connect locally, and remotely via hdbsql and HANA studio to each tenant.  Otherwise, other monitoring tools can't be used, and we're left with tools like HANA Cockpit that only shows the first tenant as seen below (The indexserver on port 30003).

HANA_Tenant_Cockpit.png

TENANT PORTS

When creating a tenant, HANA assigns a port to the new hdbindexserver, however, that port is not used for SQL connection via ODBC or JDBC but a different port.  We found that while you're on the actual HANA server as <sid>adm, you can connect without specifying the port, as HANA figures out from the instance number (-i option) and the database (-d option).  Thus, this is Method 1 for determining these ports after the connection.

1. Method 1: Local hdbsql

  • Use this method on the HANA host to determine the SQL port associated with each tenant
HANA_Tenant_Ports_Method-1.png

2. Method 2: Using 'HDB info' and 'sapcontrol'

  • If you don't have access to hdbsql login credentials, you can use this method or request the information from the HANA Admin:
  1. Run “sapcontrol –nr <instance#> -function GetProcessList” to find the tenant (DBNAME)

  2.  

    Get the process ID (PID)

  3. Run “HDB info” to find the corresponding hdbindexserver matching the PID (from step 2)

  4. Find the port and add 1 to get the SQL port used for ODBC or JDBC connection

    NOTE: If the <SID> was converted from SingleDB then the first tenant would be at port 30015

HANA_Tenant_Ports_Method-2.png

 

3. Verify Remote Connection: hdbsql

  • SYSTEMDB resides on the default and a port is not required to connect remotely
  • Remote HANA client needs to provide the port number (determined in either step 1 or 2 above) to connect to a tenant database.  Honestly, this is probably a bug because HANA should behave the same as if it's a local connection by looking up the tenant DBNAME and resolving the port to connect dynamically
  • Notice that we did not need to provide the port for SYSTEMDB, but needed it for other tenants otherwise the "Connection failed" error be encountered.

HANA_Tenant_Ports_Remote_hdbsql.png

4. HANA Studio Connection Setup

  • Once the remote connection is verified successfully in step 3, HANA Studio can add the tenant databases
  • Using HANA Studio which came with SPS09, there is likely the same bug that requires explicit connection port for tenants other than the SYSTEMDB and the tenant on default port 30015 
  • Notice how we have to specify the port with <port> concatenated to the hostname on connection properties
  • The system properties reflect the port in the hostname, and an erroneous 30015 concatenated at the back (which gets ignored during connection) - so it's just cosmetics as this method works.  It cannot be edited after the connection is created
  • The XS connection properties are also wrong and will need to be edited to remove the :<port> preceding port 8000.

HANA_Tenant_Studio_Connection_Properties.png

5. HANA Administration Console

Now it's possible to connect to ALL tenants using Studio:
  • SYSTEMDB: requires no port specification after choosing "System database container".  Notice it does not have an indexserver.  The sapstartsrv service is associated with the SYSTEMDB

HANA_Tenant_Studio_SystemDB.png

  • Tenant DB which has SQL port 30015 also does not require a port to be specified.  Normally if a DB was converted from singleDB after upgrading to SPS09, it is likely to inherit SQL port 30015 (indexserver 30003)

HANA_Tenant_Studio_First-Tenant-DB.png

  • Other tenants require the port to be specified as described in step 4, and that port shows up in the console title

HANA_Tenant_Studio_Other-Tenant-DB.png


SUMMARY

In a multi-tenancy (MDC) HANA environment each tenant has its own indexserver, but all of them share a single sapstartsrv responsible for the startup and shutdown as well as common services like the daemon.  It would be ideal to monitor all tenants from a single console, which today exists in the studio via System Monitor, but it's not a centralized configuration so each HANA administrator needs to set up their workspace accordingly using the method we described above.  Likewise, and even more complex would be to setup individual tenant connections to the Solution Manager.  What are you using today and how is your experience?

For third-party monitoring of HANA multi-tenant environment, we provide the HANA Management Pack for SCOM which supports centralized operations monitoring of such HANA environment, or for a FREE Demo or Trial of IT-Conductor cloud-based HANA monitoring.

 

Schedule a Demo