Skip to Content

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:

Potential_masterhosts.png

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:

/wp-content/uploads/2015/01/erp_userstore_settings_single_db_617785.png

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:

createTenants.PNG

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

/wp-content/uploads/2015/01/original_tenant_layout_617854.png

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:

erpConnectDataTenant.png

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:

connectDataSystemDatabase.png

The same is for the other SAP systems:

bwConnectDataTenant.png

javaConnectDataTenant.png

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

bw9_userstore_settings.PNG

System ERP

/wp-content/uploads/2015/01/erp_userstore_settings_617883.png

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:

/wp-content/uploads/2015/01/original_tenant_layout_617854.png

Now node ld2432 is shutting down.

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

/wp-content/uploads/2015/01/failover_ld2432_m_services_starting_617915.png

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

failover_ld2432_GetProcessList_ld9970.png

Once the failover is complete:

/wp-content/uploads/2015/01/failover_ld2432_m_services_started_617917.png

/wp-content/uploads/2015/01/erp_r3trans_after_failover_617924.png

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

/wp-content/uploads/2015/01/erp_r3trans_ld9970_617926.png

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:

stoped_indexserver_ld9970.PNG

Due to this the system might not come up completely:

system_restart_stopped_indexserver.PNG

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

ld9970_instance_restart.PNG

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

system_green.PNG

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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. 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:

     

    http://help.sap.com/hana/SAP_HANA_Multitenant_Database_Containers_en.pdf

     

    Best regards,

     

    Andy.

     

    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

    (0) 

Leave a Reply