You can revoke a role from a user or another role.
Revoke a role by using SQL statements
You can use the REVOKE statement to revoke a role from a user or another role.
Prerequisites
To revoke a role from a user, you must have the role to be revoked and the GRANT OPTION or GRANT ANY ROLE privilege.
For more information about how to view your roles, see View roles.
Considerations
If the GRANT OPTION privilege is not specified when a role is assigned to a user, the revocation of the role on the user does not extend to other users. If the GRANT OPTION privilege is specified when a role is assigned to a user, the revocation of the role on the user extends to other users.
Examples
SQL statements for revoking a role:
Revoke a role from a user
obclient> REVOKE role_list FROM user_name;Revoke a role from another role
obclient> REVOKE role_list FROM role_name;
When you revoke multiple roles from a user at a time, separate the roles with commas (,).
Here is an example:
obclient> REVOKE role1 FROM user1;
For more information about the REVOKE statement, see REVOKE.
Revoke a role in the OCP console
You can revoke a role from a user or another role in the OceanBase Cloud Platform (OCP) console.
Prerequisites
The TENANT_MANAGER role is assigned to you. Otherwise, request the OCP administrator to assign the role. For more information, see "Edit a user" in the OCP User Guide of the corresponding version.
Revoke a role from a user
Log on to the OCP console.
In the left-side navigation pane, click Tenants to go to the Tenants page.
In the tenant list, find a tenant whose Tenant Mode is Oracle and click the name of the tenant to go to the Overview page.
In the left-side navigation pane, click User Management.
In the user list, find the user from which you want to revoke a role and click the username to go to the details page of the user.
In the Roles section, click Modify Role.
In the Modify Role dialog box, click the Delete icon next to the role.

Click OK.
Revoke a role from another role
Log on to the OCP console.
In the left-side navigation pane, click Tenants to go to the Tenants page.
In the tenant list, find a tenant whose Tenant Mode is Oracle and click the name of the tenant to go to the Overview page.
In the left-side navigation pane, click User Management. On the page that appears, click the Roles tab.
On the Roles tab, click the name of the role that you want to revoke to go to the details page of the role.
In the Roles section, click Modify Role.
In the Modify Role dialog box, click the Delete icon next to the role.

Click OK.