Managing tenant databases

You can view the properties of tenant databases, update the properties of tenant databases, and delete tenant databases.

Viewing tenant database properties

Use the OpenAdmin Tool (OAT) for Informix® to view information about space usage, storage spaces, tenant virtual processors, chunks, tables, and indexes for tenant databases.

To view the tenant database definition, query the tenant table in the sysadmin database. For example, the following statement lists the tenant databases and their properties:

SELECT hex(tenant_id),tenant_dbsname,tenant_resources::json,
FROM tenant;

The tenant_resources column, which contains the tenant properties, is of type BSON, so you must cast the column to JSON to view the properties.

Updating the properties of tenant databases

To update properties, run the admin() or task() SQL administration API function with the tenant update argument. The updates take effect for new sessions.

You can append dbspaces, blobspaces, or sbspaces to the existing lists of storage spaces for a tenant database. The storage spaces must be empty. You must have DBA or TENANT privileges to change tenant database properties.

You cannot remove dedicated storage spaces from a tenant database unless you delete the database.

When you specify new values for the following tenant database properties, existing values are replaced.
  • dbspacetemp (temporary dbspaces that are assigned to the tenant)
  • session_limit_logspace (limit on log space for individual transactions)
  • session_limit_memory (limit on memory that is allocated per session)
  • session_limit_tempspace (limit on temporary table space per session)
  • session_limit_txn_time (limit on the length of time a transaction can run)
  • sbspacetemp (temporary sbspaces that are assigned to the tenant)
  • session_limit_locks (limit on the number of locks per session)
  • tenant_limit_space (limit on total storage space)
  • vpclass (virtual processor classes names and quantities)

Deleting tenant databases

To delete a tenant database, run the admin() or task() SQL administration API function with the tenant drop argument. You must have DBA or TENANT privileges to delete tenant databases. You cannot delete a tenant database with the DROP DATABASE statement. All dedicated storage spaces for the tenant database are emptied and become available. Any tenant virtual processors that are not shared with other tenant databases are dropped.

Copyright© 2018 HCL Technologies Limited