Rename a tenant

2023-12-25 08:49:40  Updated

The sys tenant can rename a user tenant.

Currently, OceanBase Database only supports renaming a user tenant.

Procedure

  1. Log in to the sys tenant of the cluster using the root user.

  2. 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 tenant1 to tenant2:

    obclient> ALTER TENANT tenant1 RENAME GLOBAL_NAME TO tenant2;
    

References

For more information about the ALTER TENANT statement, see ALTER TENANT.

Contact Us