Hi everyone, recently I just installed SAP HANA SPS09 and wanted to try something new. Since multitenant database containers (MDC) is a major feature in SPS09, I installed SAP HANA in single container mode and multiple containers mode as well. As you know, I'm a fan of SAP HANA, especially XS, so after adding both SAP HANA systems into SAP HANA Studio, I just visited XSEngine welcome pages directly. Just like after installing Apache Tomcat, you'll first visit the welcome page to check if the web server is running correctly.
For the single container mode, everything looked fine. But for the multiple containers mode, I failed to visit the welcome page... It seemed like hide and seek game in XSEngine. So where is XSEngine hidden and how can I visit the welcome page? :???: I did some research and wanted to share with you my experience exposing HTTP access to multitenant database containers in SAP HANA SPS09.
Everything looked fine just like before.
Since the instance number is 00, I visited port number 8000. XSEngine is up and running.
I logged on to system database container, so that's SYSTEMDB as you can see in the following screen shot. First of all, you cannot find the 'xsengine' service which you can find in the single container mode.
Since the instance number is 01, I visited port number 8001. The welcome page did not appear. :sad: Why??? :???:
The first idea came to my mind was searching the solution in SAP HANA Administration Guide. Bingo! You can find the solution from Configure HTTP Access to Multitenant Database Containers and follow the procedure. Here I won't explain the procedure again, but I'll give some screen shots and highlight some key points for you.
Before jumping into the configuration part, I highly recommend you to first have a look at Multitenant Database Containers - SAP HANA Administration Guide - SAP Library in order to have an overview of MDC. From the architecture diagram below, you can see some points:
1. The internal web dispatcher, which is introduced as a service inside SAP HANA SPS09, accept all HTTP requests and dispatch them to different databases. That's why you'll see in the following part, most configurations take place in webdispatcher.ini.
2. Only index server in tenant database by default
3. For system database, the XS server is embedded in the name server. That's why you cannot find the 'xsengine' service in the landscape.
4. For tenant database, the XS server is embedded in the index server.
1. Logged on to system database container -> Administration -> Configuration -> webdispatcher.ini -> profile -> change wdisp/system_0 on the sytem layer
- Changing the port number from 8 to 14, 3<instance>14 is the internal port number reserved for the embedded XS server of the system database.
- Replacing the default SRCURL=/ parameter with the SRCVHOST parameter, specifying the fully qualified domain name (FQDN) of the physical host as the value
2. Visit the welcome page. XSEngine is up and running. :lol:
What about creating a tenant database and visiting its XSEngine? Let's give it a shot.
1. Logged on to system database container -> SQL console -> run the following SQL
CREATE DATABASE DB1 SYSTEM USER PASSWORD Manager1;
For better understanding, I logged on to DB1 and you can see only the index server belongs to DB1 as we discussed in the architecture diagram. Since the XS server is embedded in the index server, you cannot find it as well.
2. Logged on to system database container -> Administration -> Configuration -> webdispatcher.ini -> profile -> add wdisp/system_1 on the system layer
By default, new tenant databases are assigned 3 port numbers, one for each of the following:
- Internal communication (3<instance>40-3<instance>97)
- SQL (3<instance>41-3<instance>98)
- HTTP (3<instance>42-3<instance>99)
We did not assign the port number when we created the tenant database DB1, so 30140(internal communication), 30141(SQL) and 30142(HTTP) these three port numbers are assigned to DB1. That's why we configure the port number to 3$(SAPSYSTEM)42 in the following screen shot.
3. Add the tenant database alias name to DNS. As I'm not able to do that, I just add an entry to the local "hosts" file on Windows. You can find the path in the following screen shot.
4. Visit the welcome page. XSEngine is up and running!
Don't like the embedded XS server? What about adding a dedicated 'xsengine' service? Now let's create another tenant database DB2 and add a dedicated XS server. You can find details from Add a Service to a Tenant Database - SAP HANA Administration Guide - SAP Library.
1. Logged on to system database container -> SQL console -> run the following SQL
CREATE DATABASE DB2 SYSTEM USER PASSWORD Manager2;
Identical to DB1, only the index server belongs to DB2, still no 'xsengine' service. Besides, you can imagine 30143(internal communication), 30144(SQL) and 30145(HTTP) these three port numbers are assigned to DB2.
2. Run the following SQL to add the dedicated 'xsengine' service. Replace <hostname> with yours.
ALTER DATABASE DB2 ADD 'xsengine' AT LOCATION '<hostname>:30146';
If you use an occupied port number, the following error will appear.
3. Now you can find the dedicated 'xsengine' service. Keep in mind 30146(internal communication), 30147(SQL) and 30148(HTTP) are assigned to it.
4. Configure HTTP access, add wdisp/system_2 on the system layer, use port number 3$(SAPSYSTEM)48
5. Add the tenant database alias name to DNS.
6. Visit the welcome page. XSEngine is up and running!
Till now we've configured HTTP access to SYSTEMDB, DB1, DB2 and visited the welcome page successfully.
SYSTEMDB
DB1
DB2
From above three URLs, you can find different hostnames but the same port number. That's how the internal web dispatcher in SAP HANA works, mapping various hostnames to various databases.
But how can we make sure there are three XS servers, not just one XS server? :???: Let's use Web IDE to confirm this. In order to use Web IDE, first we need to grant a role to the SYSTEM user in SYSTEMDB, DB1 and DB2 respectively.
We assume the following credentials.
<database>: <username>/<password>
SYSTEMDB: SYSTEM/Manager0
DB1: SYSTEM/Manager1
DB2: SYSTEM/Manager2
SYSTEMDB
I failed to login with the password Manager1 and Manager2 which means this XS server only belongs to SYSTEMDB.
DB1
Failed to login with the password Manager0 and Manager2 which means this XS server only belongs to DB1.
DB2
Failed to login with the password Manager0 and Manager1 which means this XS server only belongs to DB2.
In this blog post, we've first learned some basics about multitenants database containers (MDC) including the architecture at a high level. In SAP HANA SPS09, the HTTP access to MDC is not configured/exposed by default. We need to configure them manually. Thus besides SYSTEMDB we created two tenant databases DB1 and DB2, and successfully exposed HTTP access to these containers. In addition, we also learned how to add a dedicated 'xsengine' service.
Hope you enjoyed reading my blog and exposing HTTP access to MDC successfully. :smile:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 |