Hello and welcome to the SAP HANA Academy.
You are watching the video tutorial series: Building Solutions - Live 5.
The topic of this video tutorial is Initial Setup - Create Tenant Database.
Hi, I am Denys van Kempen.
For those not familiar with multi-tenancy, SAP HANA can run in two modes:
single tenant and multi-tenant.
Single tenant was the default mode for HANA 1.
Multi-tenant will be the default mode for HANA 2.
In a multi-tenant database container system, short MDC, SAP HANA provides completely isolated
databases, the containers, yet shares resources; the system.
It is designed for cloud computing, where you want to optimise resource usage -
CPU, memory, network - yet need to be able to completely isolate one database from another.
We would not want to have Pepsi look at Coca Cola’s data and vice versa.
If you would like to know more about this topic, there is a full playlist on the SAP
HANA Academy.
I will include the link to the playlist, below in the description.
To keep the distribution of HANA express as lightweight as possible, the HANA system only
contains a system database.
This system database is quite limited in what you can do with it.
You need to create a tenant for any serious development that includes all the HANA features.
To create a tenant database, you can either use the SAP HANA cockpit administration tool,
the web client, or just plain SQL.
As HANA express does not include HANA cockpit, we will be using SQL here but don’t worry,
it is easy.
You can find the SQL you need to execute in a script that we have uploaded to the GitHub
repository for our Live 5 project.
If you have installed HANA studio, you can use the SQL console and just run the statements.
We have looked at how to setup HANA studio in a previous video.
Otherwise, just open PuTTY.
Make sure you are connected as the hxeadm user, and just copy and paste the commands
from Github to PuTTY.
Copy and paste will not work directly to the VMware Player console,
so that’s why we are using PuTTY here.
HdbSQL or hdbsql is the HANA Database interactive terminal, as you can read here.
We connect we -n for the node, just use localhost; -d for the database, using systemdb,
-i for the instance, hana express uses 90 (9 0) and -u for the user.
The password is the master password you defined yourself.
Then, we are going create the tenant database with the CREATE DATABASE statement.
Give it a name: SHA
and set the password for the SYSTEM user.
This will be the system user, the super user, of the tenant database, not of the system database.
As mentioned, security of multitenant database is strictly separated.
Note the password.
And then we are going to add the DI server, the HANA deployment infrastructure server,
handles deployment of design-time artefacts into HANA.
What used to be the repository in HANA 1 with HANA XS classic model.
HANA XS advanced model uses the DI server for this
and we are also going to add the script server.
This server is used by Predictive.
Then we grant the MODELING role to the XSA_DEV user.
This is a runtime role, a very powerful default role included with HANA and we are also going
to grant a design time role ‘Developer” to our user.
This will allow XSA_DEV to work with the SAP HANA web development workbench.
XSA_DEV is a standard user that comes with HANA XS advanced model.
Well, that’s it.
For those using studio, we can now add our tenant.
Right-Click.
Add System.
Same host name, same instance number but now select tenant database and enter the name:
SHA.
Same system user but with the password we just defined.
If we then open the Administration Console and look at the landscape we see both
the di- and the scriptserver
and we can also connect the SQL console to the tenant, for example.
OK
So much for Initial Setup - Create tenant database.
You can find more video tutorials on our Youtube channel.
If you would like to be informed about new video tutorials, please subscribe to our channel.
You can connect with us on LinkedIn or follow us on Twitter, as well for updates
and we also have a page on Facebook and Google+.
If you are watching this video on YouTube,
do not hesitate to leave your comments to the video page and,
if you like, give us your vote on his video.
Thank you for watching