Quantcast
Channel: Software Logistics
Viewing all articles
Browse latest Browse all 112

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

$
0
0

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:

erp_userstore_settings_single_db.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

 

original_tenant_layout.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

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

original_tenant_layout.png

Now node ld2432 is shutting down.

 

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

 

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

failover_ld2432_m_services_started.png

erp_r3trans_after_failover.png

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

erp_r3trans_ld9970.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


Viewing all articles
Browse latest Browse all 112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>