grantPrivilegeToShare
Last updated: January 27, 2026
Grants a privilege on a database object to a Snowflake share. This allows the share to access the specified object with the granted privilege.
Note: Automatic rollback revokes the granted privilege.
Known limitation: This change type does not support database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the share to grant the privilege to | Yes |
| String | Type of object to grant privilege on* | Yes |
| String | Name of the object to grant privilege on | Yes |
| String | Name of the catalog (database) containing the object** | No |
| String | Name of the schema containing the object*** | No |
| String | Privilege to grant (see table below) | Yes |
* Supported types: DATABASE, SCHEMA, TABLE, EXTERNAL_TABLE, ICEBERG_TABLE, DYNAMIC_TABLE, VIEW, FUNCTION, TAG, SEMANTIC_VIEW
** Cannot be specified for DATABASE type.
*** Cannot be specified for DATABASE or SCHEMA types.
Privileges by object type
Object type | Valid privileges |
|---|---|
DATABASE | USAGE, REFERENCE_USAGE |
SCHEMA | USAGE |
TABLE | SELECT, EVOLVE SCHEMA |
EXTERNAL_TABLE | SELECT |
ICEBERG_TABLE | SELECT |
DYNAMIC_TABLE | SELECT |
VIEW | SELECT |
FUNCTION | USAGE |
TAG | READ |
SEMANTIC_VIEW | REFERENCES |
Prerequisites
Before granting privileges on database objects to a share, you must first grant USAGE privilege on the database:
GRANT USAGE ON DATABASE database_name TO SHARE share_name;