One SAP HANA Cloud Database – Multiple Subaccounts

Key points:

You can use a HANA database in several subaccounts and spaces.

You can use a HANA database in several subaccounts and spaces.

This allows costs to be evenly distributed among subsidiaries or facilities.

This allows costs to be evenly distributed among subsidiaries or facilities.

Application data is securely isolated from each other.

Application data is securely isolated from each other.

Why Share a Database?

Within the overall SAP Business Technology Platform (BTP) infrastructure, SAP HANA Cloud is one of the most expensive components. It is created as a subscription in a subaccount. The following image shows the infrastructure schematically with a database:

If multiple subaccounts are actively used, each with its own database, this leads not only to substantial administrative overhead but also to multiple times the license costs. The following image shows a negative example of two databases in use. Both of them must be created, maintained, and paid for.

Sharing a Database With Other Subaccounts

To nearly half the costs and effort of the infrastructure shown above, a single database can be used instead and shared with the other subaccounts and spaces.

This way, one database is used by all subaccounts. Only this single database needs to be maintained and financed. Scaling a single database is significantly more cost-effective than creating multiple databases.

An important limitation is that a database can only be shared with subaccounts in the same region. If you require subaccounts in different regions, you must create at least one HANA database in each region.

Note: We recommend creating the database in a dedicated subaccount for services shared between several other subaccounts. An advantage of of this approach is that these services can be accessed by subaccounts belonging to individual facilities or subsidiaries. This allows the costs from this central subaccount to be allocated equally across the individual facilities/subsidiaries. More information is provided in the article Which Architectures Exist in the BTP?

Before you can share a HANA database you first need to instantiate it in a subaccount as a subscription. How to create a database is described in the article Setting Up SAP HANA Cloud in BTP.

The subaccount containing the HANA database should be accessible to the database administrators. Specifically, the administrators must have at least the Subaccount Viewer role.

Note: Data within SAP HANA is completely isolated for each application. An application can never access data from other applications unless explicitly configured to do so.

To share the database with other spaces or subaccounts, you need to create an instance mapping. This is done in SAP HANA Cloud Central under the Instances section. The link to SAP HANA Cloud Central can be found in SAP BTP as follows:

  1. In the SAP BTP Cockpit, navigate to the subaccount where the HANA database was created
  2. In the menu, click on Services and then on Instances and Subscriptions
  1. In the Instances section, search for SAP HANA Cloud in the Service column. Click on the hyperlink in the Instance column (the application name).

In SAP HANA Cloud Central, select the database instance you want to share:

In the detail view that opens on the right, click the Manage Configuration button in the upper right corner. On the site that opens, click on the Instance Mapping tab.

Under the Instance Mapping heading, you will find a link to log in to Cloud Foundry. After you have done, you will see both the IDs and names of orgs and spaces in the table below.

You can now create an instance mapping by clicking Add Mapping in the upper right above the table. Select the relevant org (i.e. the relevant subaccount). You can optionally also select a specific space. If you leave this field empty, the mapping will apply to all spaces in the subaccount.

Note: You can only create instance mappings to those orgs and spaces that are in the same region as the SAP HANA Cloud instance and that you have access to.

After clicking Review and Save, the database is available in the selected org (i.e. subaccount) or the selected space.

SAP HANA Cloud uses so-called HDI containers to separate database portions that are shared through instance mapping from each other. Containers are a software technology that allows software and data to be isolated from each other. Software within a container cannot access software or data in another container.

To be able to create an HDI container, you must activate the SAP HANA Schemas & HDI Containers service with the hdi-shared service plan.