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