The sys tenant can rename a user tenant.
At present, OceanBase Database allows you to rename only user tenants.
Rename a tenant
The syntax for renaming a tenant is as follows:
obclient> ALTER TENANT old_tenant_name RENAME GLOBAL_NAME TO new_tenant_name;
Here is an example:
Log on to the
systenant as therootuser.Rename
tenant1astenant2.obclient> ALTER TENANT tenant1 RENAME GLOBAL_NAME TO tenant2;
More information
For more information about the ALTER TENANT statement, see ALTER TENANT.