Skip to Content
Technical Articles
Author's profile photo yi jiang

Having trouble connecting to your HANA tenants DB in the cloud?

First time deploying a HANA MDC instance in the cloud? Getting error trying to create or connect to HANA tenant databases?

Here are few tips on how to get started, assuming you have all information:

  • hostname and external IP (accessible from the Internet). this IP is ephemeral on public if you are not bringing your own IPs
  • system number
  • network access to required ports which are for minimal use case with SAP HANA, express edition and HANA STUDIO
  • administrators user accounts SYSTEM and XS_ADMIN to be able to manage tenants.


0. Prerequisites

The following query (to be executed in SYSTEMDB) gives you the network ports used for each tenant in the system:

or (SERVICE_NAME='xsengine'));

For HANA STUDIO connectivity, you need SQL ports opened from internet.

As a reminder, each tenant DB has 3 ports for Internal, SQL and HTTP purposes (with successive numbers in range (3xx40 to 3xx99).

Here is a clear overview of how network ports work in HANA MDC:

1. Connection

Launch and configure your HANA Studio with access to SYSTEMDB of the HANA instance you are targeting. You can use SYSTEM at first, but be sure to create appropriate technical users with limited privileges for different purposes (backup, monitoring, managing roles and users, etc.).

Open the Administration cockpit (double click on the system in the left panel), then the Configurationtab and use the value public_hostname_resolution as a filter:

You should notice only 1 entry with name use_default_route

2. Configuration

You need to add a second entry within public_hostname_resolution section. Right click on it and select Add parameter. Fill the form with:

  • as key: map_<your_hana_hostname>
  • as value: your external IP
    You can specify the scope to be system wide.

3. Validation

You can add the new connection to your tenant db in HANA Studio, with your user and specifying the targeted Tenant.
And connection should work!

If not, please double check, depending on the error message :

  • User credentials validity
  • Network access to your cloud provider

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo James Smith
      James Smith

      Hi, Jiang,

      I am running SAP HANA Express on GCP and can’t connect to the tenant database using HANA Studio.

      Connecting to the SystemDB works without issues and also connecting via hdbsql to the tenant database works.

      The tenant database shows up when running

      select * from m_databases;

      I tried both OS, Ubuntu, and SLES, without success.

      I have read that other people had the issue and it was resolved with HANA Studio 2.3.

      I upgraded to 2.3 and still have the issue.

      I was thinking it could be a Google thing, but I am not sure.

      Has anybody successfully connected to HANA Studio on GCP?

      Do you have any other advice on what I can try to connect via HANA Studio?


      Thanks & Regards

      Author's profile photo yi jiang
      yi jiang
      Blog Post Author

      Hi James,

      Have you added the map_<host> parameter in from your HANA systemdb connection ?

      I've made it work on GCP.

      Let me know.

      Kind regards


      Author's profile photo Jaime Bermúdez CastroBD
      Jaime Bermúdez CastroBD

      Your solution worked for me. There is no SAP documentation easily found on this subject.



      Author's profile photo Jaime Bermúdez CastroBD
      Jaime Bermúdez CastroBD

      I tried your solution, and it worked for SAP HANA Studio, but the connection from S/4HANA - running on the same server, was lost. It seems that the application was then looking for the mapped IP, as the dispatcher fails to start.


      Author's profile photo Jaime Bermúdez CastroBD
      Jaime Bermúdez CastroBD

      I would also like to understand why I can connect to the main indexserver database, which is one of my tenants, but not to the other tenants.



      Author's profile photo Sharath S
      Sharath S

      Hello Jaime,

      Can you try adding by giving the SQL port of the tenant database after the IP address or FQDN separated with a colon:

      You can use the query given by Yi in Prerequisites to find SQL Port


      Author's profile photo Jan van Ansem
      Jan van Ansem

      Thank you, thank you, thank you.

      I was not able to connect to the HDB instance of my S/4 instance from CAL and been pulling my hair out for 3 days.
      I downgraded my Eclipse, downgrade my JVM but after that still only managed to logon to SYSTEM database.

      Now, with your tip to add keypair map_vhcalhdbdb with value IP address it finally works.

      yi jiang I can't thank you enough for this!!

      Keep up the good work,