Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_seemann
Employee
Employee

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:

jdbc:sap://ld9968:30013?databaseName=JAV

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.

hdbuserstore

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 "ld9968.wdf.sap.corp:30041;ld2432.wdf.sap.corp:30041;ld9970.wdf.sap.corp:30041" 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.

Failover

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 stop

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

2 Comments