DROP TENANT
Deletes a tenant from a multi-tenant database.
Syntax
DROP TENANT [owner_name]tenant_name;
|
Parameters
tenant_name
Specifies the name of the tenant you want to delete. The name of the tenant must exist in the database.
owner_name
Specifies the name of the schema which qualifies the table.
Notes
Each database contains users, domains, and tenants. A DBA must follow the order specified below to drop a tenant from the database:
1. DROP USER for every user in the domain.
2. DROP DOMAIN for every domain defined for the tenant.
3. DROP TENANT.
Example
The following example shows how to drop the tenant, mtcustomer, from the multi-tenant table:
DROP TENANT pub.mtcustomer;
|
If a tenant that is being dropped belongs to one or more groups, it is first disassociated from the group(s) before being dropped.
In this section: