The sys tenant can rename a user tenant.
Currently, OceanBase Database only supports renaming a user tenant.
Considerations
Renaming a tenant using the command-line method (the ALTER TENANT command) will cause the tenant to appear as unavailable in OCP. If you need to manage the tenant through OCP, make sure to perform the renaming operation directly within OCP. For more details on renaming tenants in OCP, refer to FAQ on OceanBase tenants.
Procedure
Log in to the
systenant of the cluster using therootuser.Rename a user tenant.
The statement is as follows:
ALTER TENANT old_tenant_name RENAME GLOBAL_NAME TO new_tenant_name;For example, to change the tenant name from
tenant1totenant2:obclient> ALTER TENANT tenant1 RENAME GLOBAL_NAME TO tenant2;
References
For more information about the ALTER TENANT statement, see ALTER TENANT.