SHOW CALLER GRANTS

statementsupportedAccess control (grants, roles)

docs.snowflake.com ↗

Lists the caller grants being used to implement restricted caller’s rights.

Syntax

supportedpartialnot supportednot scored

SHOW CALLER GRANTS
{
{ ON <object_type> <object_name> | ON ACCOUNT }
| TO { ROLE | DATABASE ROLE } <owner_name> [ INCLUDE HIERARCHY ]
}

Parameters

NameRequiredDescription
ON object_type object_name or ON ACCOUNTSpecifies whether to list the caller grants on a specific object or list all caller grants involving the account. Use the singular form of object_type, for example, TABLE or WAREHOUSE.
TO ROLE <owner_name> or TO DATABASE ROLE <owner_name>Specifies an executable owner, which lists all caller grants that have been granted to that owner. Specify INCLUDE HIERARCHY to also list caller grants held by every account role, database role, and application role in the specified role’s hierarchy, including the account-level PUBLIC role. Each row’s grantee_name is the role that holds the caller grant, even when that role is granted directly or indirectly to the role you specified. Caller grants held by instance roles, service roles, or class roles are omitted.

Usage notes

Output

The output of the command includes the following columns, which describe the properties and metadata of the object: Column | Description created_on | Date and time when the caller grant was granted. privilege | Privilege that executables owned by grantee_name can run with. granted_on | Type of object that is subject to the caller grant, regardless of whether it was granted directly on an object or on all objects of that type. name | If the caller grant was granted directly on a specific object, specifies the name of the object. is_inherited | If TRUE, the caller grant was granted to all objects of a certain type using a GRANT INHERITED CALLER or GRANT ALL INHERITED CALLER PRIVILEGES statement. If FALSE, the caller grant was granted directly on the name object. inherited_from | If the caller grant was granted to all objects of a certain type using a GRANT INHERITED CALLER or GRANT ALL INHERITED CALLER PRIVILEGES statement, indicates the level at which it was granted. One of ACCOUNT, DATABASE, or SCHEMA. inherited_from_database | If inherited_from is a database (including an application or application package), specifies the name of the database. If inherited_from is a schema, specifies the name of the database that contains the schema. inherited_from_schema | If inherited_from is a schema, specifies the name of the schema. granted_to | Type of executable owner to which the caller grant was granted. One of ROLE or DATABASE ROLE. grantee_name | Name of the executable owner to which the caller grant was granted.

Access control requirements

Anyone can execute a SHOW CALLER GRANTS TO … command to list caller grants that have been granted to a specific executable owner. Executing a SHOW CALLER GRANTS ON … command requires the following privilege: Privilege | Object | Notes Any privilege | Specified object | You need at least one privilege on the object specified in the SHOW CALLER GRANTS command. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.