Convert an SAP
HANA System to Support Multitenant Database Containers
You
can convert an SAP HANA system to support multitenant database containers using
the command line tool hdbnsutil. Converting an SAP HANA system to a
multiple-container system is permanent and cannot be reversed.
Prerequisites
· The statistics
server is not running as a separate server process (statisticsserver), but
instead as an embedded service in the master index server. If this is not the
case, migrate the statistics server to the embedded statistics service as
described in SAP Note 1917938.
· Your system is
revision 90 or higher.
Context
If
your system was installed in single-container mode, you can still implement multitenant
database containers by converting the system to a multiple-container system.
During the conversion process, the system database and one tenant database are
created. The tenant database contains all the data of the original system,
including users, system configuration, and connection properties (port
configuration). After conversion, you can create and configure further tenant
databases as needed.
Procedure
Shut the system
down.
As
the operating system user (that is, <sid>adm user), log on to the server
on which the master index server is running and run the following command:
sapcontrol -nr <instance_number> -function
StopSystem HDB
Convert the system
from a single-container system to a multiple-container system with the
following command:
/usr/sap/<SID>/HDB<instance>/exe/hdbnsutil
-convertToMultiDB
The
conversion process triggers the following actions:
· Sets the
global.ini property [multidb] mode to multidb.
· Creates the system
database (SYSTEMDB@<SID>).
· Converts the
existing SAP HANA database to a tenant database. The name of this database is
the system ID (<SID>@<SID>).
· Updates the secure
store in the file (SSFS) system.
Set the password
for the SYSTEM user of the system database.
In
a new session, run the following command:
/usr/sap/<SID>/HDB<instance>/exe/hdbnameserver
-resetUserSystem
Note
The password must comply with the password policy configured in the original
system. For more information, see Password Policy Configuration Options in the
SAP HANA Administration Guide.
Start the system
database.
In
a new session, run the following command:
sapcontrol -nr <instance_number> -function
StartSystem HDB
Start the tenant
database:
Log on to the
system database using HDBSQL:
/usr/sap/<SID>/HDB<instance>/exe/hdbsql
\c -n <host> -i <instance_number> -u
SYSTEM -p <password> -d SYSTEMDB
Note
Since this is the first time you're logging on to the system database, you may
be required to change the password you set in step 3. This depends on how the
password policy was configured in the original system. The default password
policy requires a password change the first time a user logs on. If you are
required to change the SYSTEM user password, you can do so by executing the SQL
statement: ALTER USER SYSTEM PASSWORD <new_password>.
Execute the
following SQL statement:
ALTER SYSTEM START DATABASE <DB_NAME>
Note
The name of the database is the same as the SID.
Results
Your
SAP HANA system is a multiple-container system with one system database and one
tenant database, both of which are running. You can verify this by querying the
public view M_DATABASES from the system database. The result will look like
this:
| DATABASE_NAME
|DESCRIPTION | ACTIVE_STATUS |
|-----------------|----------------------------------|---------------|
| SYSTEMDB
| SystemDB-<SID>-<INSTANCE> | YES |
| <SID> |
SingleDB-<SID>-<INSTANCE>
| YES |
Note
the following about the tenant database:
· It contains all
the data (including users, configuration, and connection properties) of the
original system.
· The password of
its SYSTEM user is the password of the SYSTEM user of the original system.
· Its trace and
configuration files are now stored at the following location:
/usr/sap/SID/HDB<instance>/host/trace/DB_<database_name>.
No comments:
Post a Comment