Revokes a role from a group, login, login profile, or role:
revoke role {role_name [, role_list ...]} from {grantee [, grantee ...]}
revoke role doctor_role from specialist_role
revoke role doctor_role, surgeon_role from specialist_role, intern_role, mary, tom
revoke role nurse_role from doctor_role granted by roleAdmin
revoke role oper_role from lp_operator
You can revoke a role from a user while the user is logged in. The SAP ASE server verifies a user’s activated roles before performing access checks.
If you revoke a role from a login profile, the SAP ASE server revokes the role from all users assigned to that profile, including users currently logged in to the SAP ASE server.
proc_role in Reference Manual: Building Blocks
sp_activeroles, sp_adduser, sp_changedbowner, sp_changegroup, sp_displaylogin, sp_displayroles, sp_dropgroup, sp_dropuser, sp_helpgroup, sp_helprotect, sp_helpuser in Reference Manual: Procedures
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for revoke role differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | When granular permissions is enabled, you must be a user with manage roles privilege. |
Disabled | With granular permissions enabled:, you can revoke roles only from the master database. Only a system security officer can revoke sso_role, oper_role, or a user-defined role from a user or a role. Only system administrators can revoke sa_role from a user or a role. Only a user who has both sa_role and sso_role can revoke a role that includes sa_role. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 85 |
Audit option | role |
Command or access audited | create role, drop role, alter role, grant role, or revoke role |
Information in extrainfo |
|