Skip to Content
Technical Articles

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.

Steps

0. Prerequisites

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

SELECT DATABASE_NAME, SERVICE_NAME, PORT, SQL_PORT, (PORT + 2) HTTP_PORT 
FROM SYS_DATABASES.M_SERVICES
WHERE  ((SERVICE_NAME='indexserver' and COORDINATOR_TYPE= 'MASTER') 
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
3 Comments
You must be Logged on to comment or reply to a post.
  • 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

  • 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

    Yi

  • SAP HANA is designed to replicate and ingest structured data from SAP and non-SAP relational databases, applications, and other systems quickly. Because the data is stored in-memory, it can be accessed in near real-time by analytic and transactional applications that sit on top of HANA.