Purpose
This statement is used to delete an OceanBase Database tenant.
Notice
You can execute the DROP TENANT statement only when you are connected to the sys tenant as the root user.
Syntax
drop_tenant_stmt:
DROP TENANT [IF EXISTS] tenant_name [PURGE|FORCE];
Parameters
| Parameter | Description |
|---|---|
| tenant_name | The name of the tenant to be deleted. |
| PURGE | Indicates that the tenant is to be deleted and will not be moved to the recycle bin. When the recycle bin feature is disabled for the sys tenant, the DROP TENANT statement and the DROP TENANT... PURGE statement have the same effect. |
| FORCE | Indicates that the tenant is to be forcibly deleted, and the integrity of physical backup data cannot be guaranteed. The deleted tenant will not be moved to the recycle bin. |
Examples
Drop the test_tenant1 tenant.
obclient> DROP TENANT test_tenant1;
