SHARES view

This Information Schema view displays all outbound and inbound shares for which the current role has been granted access privileges. This view provides real time information with no latency of data.

Columns

ColumnData typeDescription
CREATED_ONTIMESTAMP_LTZThe timestamp when the share was created.
KINDVARCHARThe kind of the share, outbound or inbound.
OWNER_ACCOUNTVARCHARThe owner account of the share.
NAMEVARCHARThe name of the share.
DATABASE_NAMEVARCHAR

The name of the primary database associated with the share. This field is empty if no database has been granted to the share.

TOVARCHAR

A comma-separated list of target accounts the share is shared with (outbound). This field is empty if the share has no target accounts.

OWNERVARCHARThe name of the role that owns the share.
COMMENTVARCHARComment associated with the share, if any.
LISTING_GLOBAL_NAMEVARCHAR

Global unique name of the listing associated with the share, if any.

SECURE_OBJECTS_ONLYVARCHAR

Indicates whether the share can only have secure objects granted to it.

Usage notes

The view doesn’t capture deleted shares.

Examples

Retrieve all shares in the current account:

SELECT * FROM <any_database>.INFORMATION_SCHEMA.SHARES;