DATABASE SURVIVAL GUIDE
Creating 21st Tenant in SAP HANA MDC system
Of course, you are having 20 tenant database if you are reading this..
SAP HANA, best known for in-memory database platform, provides good capability on database administration perspective. Here you will find how you can setup 21st tenant database (20 tenants can be setup without an issue, unless you tweak a parameter to allow additional ports to be opened on the server).
here, you can see 20 tenant databases exist, and I’m going to create another 1
hdbsql SYSTEMDB=> CREATE DATABASE HDBABC021 SYSTEM USER PASSWORD “HelloWorld123!”
* 2: general error: Too many databases in use;No free port found on host: hana03–01in range [30240,30300]. SQLSTATE: HY000
This is limitation with regards to the available ports 3XX40 until 3XX99, hence by default with each instance you could have a maximum of 20 tenant databases. Note: 2101244
alter system alter configuration (‘global.ini’,’SYSTEM’) set (‘multidb’,’reserved_instance_numbers’) = ‘1’ with reconfigure
This requires database restart as per [Note 2645754] , and also as observed.
hdbsql SYSTEMDB=> CREATE DATABASE HDBABC021 SYSTEM USER PASSWORD “HelloWorld123!”
0 rows affected (overall time 85.934789 sec; server time 85.913601 sec)
The new tenant is configured on port 303xxx
Now let’s try to add xsengine process to the newly created tenant database:
hdbsql SYSTEMDB=> alter database HDBABC021 add ‘xsengine’;
0 rows affected (overall time 51.019700 sec; server time 51.002870 sec)
Now, let’s say if you need to restrict the new tenant to use max 30G from the OS. Here’s how (and yeah, it’s online operation, means no DB restart):
alter system alter configuration (‘global.ini’,’DATABASE’,’HDBABC021') set (‘memorymanager’,’allocationlimit’) = ‘30720’ with reconfigure
If you find anything +/-, let me know.