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.
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:
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
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.
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
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
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
Have you added the map_<host> parameter in from your HANA systemdb connection ?
I've made it work on GCP.
Let me know.
Your solution worked for me. There is no SAP documentation easily found on this subject.
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.
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.
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
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,