Schema:

ACCOUNT_USAGE

GRANTS_TO_SHARES view

This Account Usage view can be used to query access control privileges that have been granted to a share. The information in this view could have a latency of up to 3 hours.

Columns

The following table provides definitions for the GRANTS_TO_SHARES view columns.

ColumnData typeDescription
CREATED_ONTIMESTAMP_LTZThe date and time when the privilege was granted to the share.
MODIFIED_ONTIMESTAMP_LTZThe date and time when the privilege was last updated.
DELETED_ONTIMESTAMP_LTZ

The date and time when the privilege was revoked from the share. This value is null if the privilege hasn’t been revoked.

PRIVILEGEVARCHARThe name of the privilege granted on the object.
GRANTED_ONVARCHARThe kind of the object on which the privilege was granted.
OBJECT_NAMEVARCHARThe name of the object on which the privilege was granted.
OBJECT_DATABASEVARCHAR

The database that contains the object on which the privilege was granted. A null value indicates that the object is not database-scoped.

OBJECT_SCHEMAVARCHAR

The schema that contains the object on which the privilege was granted. A null value indicates that the object is not schema-scoped.

SHARE_NAMEVARCHARThe name of the share to which the privilege was granted.
GRANTED_BYVARCHAR

The role that granted the privilege. A null value indicates that the privilege is a system grant.

GRANTED_BY_ROLE_TYPEVARCHAR

The type of role that granted the privilege. Values are ROLE and DATABASE_ROLE.

Usage notes

  • This view doesn’t include access control privileges to the 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.