- Schema:
For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).
GRANTS_ TO_ SHARES view¶
Important
This view is only available in the organization account. For more information, see Premium views in the organization account.
Organization Usage performance
When you query a specific view in the SNOWFLAKE.ORGANIZATION_USAGE schema, follow the organization-wide guidance in
Performance (Organization Usage): bound every scan on history views, list
columns explicitly, and use the time filter column table plus worked SQL and anti-patterns there.
This Organization Usage view can be used to query access control privileges that have been granted to shares owned by the accounts in your organization.
Each row in this view corresponds to a privilege granted on an object to a share.
This view is available only in the organization account. Users with the GLOBALORGADMIN role, or users granted the SNOWFLAKE.ORGANIZATION_USAGE_VIEWER application role, can access it. For details, see Accessing the ORGANIZATION_USAGE schema.
Columns¶
Organization-level columns
| Column Name | Data Type | Description |
|---|---|---|
| ORGANIZATION_NAME | VARCHAR | Name of the organization. |
| ACCOUNT_LOCATOR | VARCHAR | System-generated identifier for the account. |
| ACCOUNT_NAME | VARCHAR | User-defined identifier for the account. |
Additional columns
| Column Name | Data Type | Description |
|---|---|---|
| CREATED_ON | TIMESTAMP_LTZ | Date and time (in the UTC time zone) when the privilege is granted to the share. |
| MODIFIED_ON | TIMESTAMP_LTZ | Date and time (in the UTC time zone) when the privilege is updated. |
| DELETED_ON | TIMESTAMP_LTZ | Date and time (in the UTC time zone) when the privilege is revoked. |
| PRIVILEGE | VARCHAR | Name of the privilege granted on the object. |
| GRANTED_ON | VARCHAR | Object kind, such as TABLE or DATABASE, on which the privilege is granted. |
| OBJECT_NAME | VARCHAR | Name of the object on which the privilege is granted. |
| OBJECT_DATABASE | VARCHAR | Name of the database that contains the object on which the privilege is granted. A null value indicates that the object is not database-scoped. |
| OBJECT_SCHEMA | VARCHAR | Name of the schema that contains the object on which the privilege is granted. A null value indicates that the object is not schema-scoped. |
| SHARE_NAME | VARCHAR | Name of the share to which the privilege is granted. |
| GRANTED_BY | VARCHAR | Indicates the role that authorized a privilege grant to the share. GRANTED_BY displays empty for privileges granted by the SNOWFLAKE system role. |
| GRANTED_BY_ROLE_TYPE | VARCHAR | Either ROLE or DATABASE_ROLE. |
Usage notes¶
- Latency for the view may be up to 24 hours.
- This view doesn’t include access control privileges to shares that have been dropped.
- This view records current grants and historical grants, including grants that were revoked or granted again.
- This view supports common data object types that can be granted to a share, including Database, Schema, Table, View, Function, Database Role, and so on.