Schema:

ORGANIZATION_USAGE

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 NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization.
ACCOUNT_LOCATORVARCHARSystem-generated identifier for the account.
ACCOUNT_NAMEVARCHARUser-defined identifier for the account.

Additional columns

Column NameData TypeDescription
CREATED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the privilege is granted to the share.
MODIFIED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the privilege is updated.
DELETED_ONTIMESTAMP_LTZDate and time (in the UTC time zone) when the privilege is revoked.
PRIVILEGEVARCHARName of the privilege granted on the object.
GRANTED_ONVARCHARObject kind, such as TABLE or DATABASE, on which the privilege is granted.
OBJECT_NAMEVARCHARName of the object on which the privilege is granted.
OBJECT_DATABASEVARCHARName 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_SCHEMAVARCHARName 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_NAMEVARCHARName of the share to which the privilege is granted.
GRANTED_BYVARCHARIndicates 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_TYPEVARCHAREither 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.