The sys tenant can rename a user tenant.
Currently, OceanBase Database only supports renaming a user tenant.
Procedure
Log in to the
systenant of the cluster using therootuser.Rename a user tenant using the following statement:
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.