Create A Tenant Database

This article describes how to create a tenant database in HANA DB. To create a tenant database, first login to SystemDB using the SYSTEM user either by using hdbsql or HANA Studio. Execute the following SQL statement to create the database DB1.

Listing 1


The above create statement will create a new database using the SYSTEM user. Once the database has been created, you can verify its status by executing the following SQL.

Listing 2


Take note of the ACTIVE_STATUS field, if the value for this field is NO, it means the database is not running and must be started. To the start the database, execute the following SQL statement.

Listing 3


You can now connect to the database using hdbsql or HANA Studio. For hdbsql, use the following command parameters.

hdbsql=> \c -n hostname:39013 -u SYSTEM -p password -d DB1
In HANA Studio, you will need to add a New System, select the Multiple containers mode and specify the tenant database name.