REVOKE DATABASE ROLE
statementsupportedAccess control (grants, roles)Revokes a database role from an account role or another database role.
Syntax
supportedpartialnot supportednot scored
REVOKE [ GRANT OPTION FOR ]
DATABASE ROLE <name>
FROM { ROLE | DATABASE ROLE } <parent_role_name>
[ RESTRICT | CASCADE ]
REVOKE DATABASE ROLE <name> FROM APPLICATION <app_name>
Parameters
| Name | Required | Description |
|---|---|---|
name | Specifies the identifier for the database role to revoke. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. | |
DATABASE ROLE parent_role_name | Revokes the database role from the specified database role. | |
ROLE parent_role_name | Revokes the database role from the specified account role. | |
APPLICATION app_name | Revokes the database role from the specified Snowflake Native App. | |
GRANT OPTION FOR | optional | If specified, removes the ability for the recipient role to grant the database role to another role. The database role grant itself remains, so the recipient role still inherits the granted database role’s privileges. Default: No value, which revokes the database role grant. |
RESTRICT | CASCADE | optional | Determines whether the revoke operation succeeds when the database role has been re-granted to another role. These clauses apply to REVOKE DATABASE ROLE ... FROM ROLE and REVOKE DATABASE ROLE ... FROM DATABASE ROLE. RESTRICT: If the database role being revoked has been re-granted to another role, the REVOKE command fails. CASCADE: If the database role being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants. GRANT OPTION FOR ... CASCADE revokes the dependent grants and leaves the database role grant in place without the grant option. CASCADE without GRANT OPTION FOR revokes the database role grant and the dependent grants. Default: RESTRICT |