Migrating ERP and BW on HANA to a Single HANA System with Multitenant Database Containers
Having successfully installed HANA with multitenant database containers (see my previous blog), I wanted to find out if everything would run just as smoothly in the case of an update to SPS 09 with conversion to multitenant database containers. As in my first blog, multitenant database containers are abbreviated to MDC.
My starting point was a HANA database on revision 80 with SAP EHP 6 for SAP ERP 6.0, version for SAP HANA running on top of it. The BW system was running on a separate HANA that was still on revision 70. The idea was to get the ERP and BW systems running on two tenants in the same HANA.
Updating to SPS 09
I downloaded the latest software components from SAP Service Marketplace using the SAP HANA studio (at the time, this was revision 92), and then prepared the software archive for the updatebefore executing hdblcmgui. All this is well described in the SAP HANA Server Installation and Update Guide.
Don’t be put off by the fact that you don’t see an option to migrate to MDC in the update wizard, as we did in the installation procedure. The conversion to MDC is that it is a post-installation step (see section “Converting to MDC” below). And actually this makes sense, because many customers will want to introduce MDC after they have been working with the new support package stack for a while. The update to SPS 09 from a lower support package stack is always from a single container to a single container.
We ran into a few minor issues at operating system level, which were solved by ensuring that we had upgraded to the versions recommended in SAP Note 1944799 (our system landscape hadn’t been updated for a while). We also migrated to CommonCryptoLib as described in SAP Note 2093286.
More serious was the fact that the ERP system wouldn’t start once the update had finished. This was because the new 3-digit HANA revision codes were not recognized:
According to SAP Note 1952701, we needed 740 Patch Level 48 but unfortunately this version was no longer on SAP Service Marketplace, so we ended up upgrading the kernel from 740 to 741.
Converting to MDC
The conversion from a single database container to multitenant database containers worked as described in the documentation. Make sure you don’t forget any of the pre- or post-conversion steps, and migrate – don’t remove – the statistics server.
For an example with screen shots, see this blog post by N. van der Linden: http://scn.sap.com/community/developer-center/hana/blog/2014/12/17/convert-to-a-multi-tenant-hana-database .
The result is one system database and one tenant database inside a HANA system that supports multiple database containers (as opposed to installation with MDC, which gives you only the system database). The system ID and the name of the tenant database are the same: in our example, HN1.
We were gratified to see the schema of our ERP system in the catalog of the tenant database, and not under the system database:
We now started the ERP system, this time without issues.
The only issue we did notice was that the repository roles were missing in the system database:
It turned out that the problem had been caused by our shutting down the database while the thread ImportOrUpdateContent was still active in the system database (visible on the Performance tab):
This thread was triggered as part of the conversion to MDC, when the command hdbnameserver –resetUserSystem was issued. The consequences can sometimes be more serious, so make sure you wait for the import of the delivery units to finish before shutting down. For more information, see SAP Note 2136496. As of Revision 94, ImportUpdateContent will no longer be triggered by this command. Moreover, development has told us that it plans to minimize the delivery units import time to a fraction of what it is in SPS 09.
Transferring the BW system to the same HANA as the ERP system
We started by creating a second tenant in the target system. We gave it the same name as the source system SID (HB1), but there is no technical reason why you have to do this. It was then necessary to update the source system to SPS 09 and convert it to MDC, before backing up the tenant in the source system and recovering it into the target tenant and system. SAP HANA database backup and recovery is explained in the SAP HANA Administration Guide in SAP Help Portal. Thus, the process was as follows:
- Update target system to SPS 09 (see first section above).
- Convert target system to MDC (see second section above).
- Create second tenant in target system.
- Update source system to SPS 09.
- Convert source system to MDC.
- Back up tenant in source system.
- Recover this backup into the target system tenant created in step 3.
One thing to note is that once we had done the recovery, the password of the tenant’s SYSTEM user reverted to what it had been in the source system, overwriting the password we had specified when creating the tenant in the target system. This is normal system behavior. For more information about the passwords of MDC systems, see the documentation.
The next step was to update the SAP HANA database client of the ERP as well as the BW system with hdbsetup.
Then, before restarting HANA or our BW system, we reconfigured the connection from BW to the new HANA database with the <SID>adm user using hdbuserstore. In the screen shot below, the turquoise rectangle represents the fully qualified domain name of the original HANA system and the yellow rectangles represent the fully qualified domain name of the HANA multitenant system.
For more information about hdbuserstore, see the documentation here.
In the above example, the SQL port of our BW tenant is 30041 because the instance number is 00 and 3<instance number>41 is the first SQL port assigned to a manually created tenant.
For more information about the ports of multitenant database containers, see the documentation here. Note, in particular, that the ports for a converted tenant database are different from those of tenant databases that are added subsequently.
Enabling HTTP access to the correct database container
We now configured the internal SAP Web Dispatcher so that it would know which HTTP requests to send to which database container from the Web-based applications running on the XS engine.
Originally, we set up IP addresses for each tenant database but this is not necessary; it works fine with DNS alias host names.
The first entry (wdisp/system_0) initially looked like this:
SID=$(SAPSYSTEMNAME), EXTSRV=http://localhost:3$(SAPSYSTEM)08, SRCURL=/
This entry is for the converted tenant which, in our case, is the tenant on which the ERP system runs.
We changed it as follows because we required additional entries:
SID=$(SAPSYSTEMNAME), EXTSRV=http://localhost:3$(SAPSYSTEM)08, SRVHOST=<fqdn>
We added a second entry with the DNS alias for the BW tenant (wdisp/system_1) and another entry with the DNS alias for the system database (wdisp/system_3).
We also updated the XS properties for each of our database containers in order to be able to open and work with the SAP HANA cockpit from the SAP HANA studio.
Converted tenant database (on which ERP runs):
Created tenant database (on which BW runs):
You can find full step-by-step instructions on how to configure HTTP access to multitenant database containers in SAP Help Portal.