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


1  EXECUTE FUNCTION
1 admin
1 task
2  (
2  'tenant drop' , 'database_name' '
2  ) ;
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');