Skip to Content
Author's profile photo Stefan Seemann

HANA MDC. Using multiple database tenants in a Scale-out scenario.

This blog tries to provide an overview about how HANA Multitenant Database Container (MDC) is used in a Scale-out scenario.

Given a five node Scale-out system:

     ld9968 (Master), ld9969 (Worker), ld2431 (Worker), ld2432 (Worker), ld9970(Standby)

Scale-out scenario

In this Scale-out system there are three potential masternodes:


So from the perspective of the client application the userstore, which contains the connectivity data to the database, needs to have these three hosts to make sure it always gets a connect to a master node. So the userstore has to look like this:


If the Scale-out system is using Multitenant Database Containers the failover concept is still the same. That means if a master host fails another host takes over. During fail over the services are moved from the failing node to the node which is taking over.

Tenant creation

In the above system three tenants were created:


For creation enter the internal communication port. The SQL port will be port+1, the XS port will be port+2.

There is one exception though: internal communication port 03 -> SQL port 15 -> XS port 08.

Example: ld9968:3+<Instance Number>+<port> = ld9968:30040


This the overview about all tenants in that database.

Installation of the SAP systems

During installation of the three SAP systems the following entries were made on the database dialog:


Within software provisioning manager the connection to the HANA database is done via JDBC. The JDBC connection allows to use a database tenant name instead of the SQL port. By using the database tenant name the JDBC driver switches automatically to the corresponding database tenant. Due to this you have to enter the host where the system database is running which is the initial Master host. In this case it is ld9968.

<software provisioning manager installation directory>/HdbCmdOut.log:

….JdbcDriver | URI: file:/home/emroot/install/ngdbc.jar

….JdbcConnection | Start new connection with connect URL: jdbc:sap://ld9968:30013 connect user: SYSTEM

….JdbcConnection | Instance is a multitenant database.

….JdbcConnection | Start new connection with connect URL: jdbc:sap://ld9968:30013?databaseName=ERP connect user: SYSTEM

….JdbcConnection | Start new connection with connect URL: jdbc:sap://ld9968:30013 connect user: SYSTEM

The software provisioning manager recognizes that the instance is using MDC and brings up the dialog to enter the data for the System Database:


The same is for the other SAP systems:



For the SAP JAVA server the connectURL also contains the database tenant name. In this case it is:


Unfortunately this only works as long as node ld9968 is available and hosts the system database which does the redirection to the tenant.

There should be a solution for this soon.


After the installation the hdbuserstore for the ERP and the BW system look like the following scrennshots.

In case of MDC unfortunately the current software provisioning manager only puts the first node into the hdbuserstore.
That means to have all relevant hosts in the userstore a manual adaption has to be made which is quite simple.

Logon as sidadm on the application host and run the command:

hdbuserstore set DEFAULT “;;” SAPABAP1 <Password>

System BW9


System ERP


That means the userstore contains the initial host of the tenant plus the potential masterhosts of the Scale-out system.


To simulate the failover we simply shutdown the instance.

Again the complete overview of the system:


Now node ld2432 is shutting down.

ld2432:/usr/sap/OQT/HDB00/ld2432/trace > HDB stopfailover_ld2432_GetProcessList.png


As ld9970 is the standby node all services from node ld2432 are moved to ld9970


Once the failover is complete:



The SAP system is still able to connect. The details can be checked in file trans.log.


After bringing the failing node back up it becomes the new standby node. To get to the initial layout a complete restart of the system is necessary.

During the system restart you might recognize that the indexserver services on ld9970 still exist:


Due to this the system might not come up completely:


To get around this simply restart the instance on node ld9970:


Once the instance is started the indexserver srvices are gone and the system should be green:


More information about MDC can be found in the SAP HANA Administration Guide

Assigned Tags

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

      Hi Stefan,


      very useful blog thanks.


      I am just implementing MDC with High Isolation on a Scale-Out Hana, this blog has answered a lot of my questions which weren't 100% explained in the doco.


      For everybody, this is the link to the MDC Admin Guide SP11:



      Best regards,




      p.s. we are paying particular attention to the Tenant DB Ports, and designing a regime of unique Tenant DB Ports across all Hana Systems at each layer of the landscape, to enable everything to be prepared for future Tenant Mobility and avoid Port conflicts when moving a Tenant from one Hana system to another one day whenever that will be possible

      Author's profile photo Naga Rama Krishna Adepu
      Naga Rama Krishna Adepu

      Thanks alot for writing this blog. Very informative.