tenant drop argument: Drop a tenant database (SQL Administration API)

Use the tenant drop argument with the admin() or task() function to drop a tenant database.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+--(------------------------------->
                     '-task--'      

>--'tenant drop'--,--'database_name'--'--)--;------------------><

Element Description Key Considerations
database_name The name of the tenant database. Must be an existing tenant database.

Usage

You must have DBA privileges or been granted the TENANT privilege to run this command. No other connections to the database can be open.

The tables and data in the database are deleted. The storage spaces that are dedicated to the tenant database are freed. The database tenant properties are removed from the tenant table in the sysadmin database. The associated tenant virtual processor class is dropped if it is not associated with any other tenant database.

The following statement drops the companyA tenant database:
EXECUTE FUNCTION task('tenant drop', 'companyA');

Copyright© 2019 HCL Technologies Limited