- Connecting to Snowflake
- Loading Data into Snowflake
- Unloading Data from Snowflake
- Using Snowflake
- Sharing Data Securely in Snowflake
- Managing Your Snowflake Organization
- Managing Your Snowflake Account
- Managing Security in Snowflake
- Managing Governance in Snowflake
- Managing Cost in Snowflake
- General Reference
- SQL Command Reference
- Summary of Commands
- All Commands (Alphabetical)
- ALTER <object>
- ALTER ACCOUNT
- ALTER API INTEGRATION
- ALTER CONNECTION
- ALTER DATABASE
- ALTER EXTERNAL FUNCTION
- ALTER EXTERNAL TABLE
- ALTER FILE FORMAT
- ALTER FUNCTION
- ALTER INTEGRATION
- ALTER MASKING POLICY
- ALTER MATERIALIZED VIEW
- ALTER NETWORK POLICY
- ALTER NOTIFICATION INTEGRATION
- ALTER PIPE
- ALTER PROCEDURE
- ALTER RESOURCE MONITOR
- ALTER ROLE
- ALTER ROW ACCESS POLICY
- ALTER SCHEMA
- ALTER SECURITY INTEGRATION
- ALTER SEQUENCE
- ALTER SESSION
- ALTER SESSION POLICY
- ALTER SHARE
- ALTER STAGE
- ALTER STORAGE INTEGRATION
- ALTER STREAM
- ALTER TABLE
- ALTER TABLE … ALTER COLUMN
- ALTER TAG
- ALTER TASK
- ALTER USER
- ALTER VIEW
- ALTER WAREHOUSE
- BEGIN
- CALL
- COMMENT
- COMMIT
- COPY INTO <location>
- COPY INTO <table>
- CREATE <object>
- CREATE ACCOUNT
- CREATE API INTEGRATION
- CREATE <object> … CLONE
- CREATE CONNECTION
- CREATE DATABASE
- CREATE EXTERNAL FUNCTION
- CREATE EXTERNAL TABLE
- CREATE FILE FORMAT
- CREATE FUNCTION
- CREATE INTEGRATION
- CREATE MANAGED ACCOUNT
- CREATE MASKING POLICY
- CREATE MATERIALIZED VIEW
- CREATE NETWORK POLICY
- CREATE NOTIFICATION INTEGRATION
- CREATE PIPE
- CREATE PROCEDURE
- CREATE RESOURCE MONITOR
- CREATE ROLE
- CREATE ROW ACCESS POLICY
- CREATE SCHEMA
- CREATE SECURITY INTEGRATION
- CREATE SEQUENCE
- CREATE SESSION POLICY
- CREATE SHARE
- CREATE STAGE
- CREATE STORAGE INTEGRATION
- CREATE STREAM
- CREATE TABLE
- CREATE | ALTER TABLE … CONSTRAINT
- CREATE TAG
- CREATE TASK
- CREATE USER
- CREATE VIEW
- CREATE WAREHOUSE
- DELETE
- DESCRIBE <object>
- DESCRIBE EXTERNAL TABLE
- DESCRIBE FILE FORMAT
- DESCRIBE FUNCTION
- DESCRIBE INTEGRATION
- DESCRIBE MASKING POLICY
- DESCRIBE MATERIALIZED VIEW
- DESCRIBE NETWORK POLICY
- DESCRIBE PIPE
- DESCRIBE PROCEDURE
- DESCRIBE RESULT
- DESCRIBE ROW ACCESS POLICY
- DESCRIBE SEQUENCE
- DESCRIBE SESSION POLICY
- DESCRIBE SHARE
- DESCRIBE STAGE
- DESCRIBE STREAM
- DESCRIBE TABLE
- DESCRIBE TASK
- DESCRIBE USER
- DESCRIBE VIEW
- DROP <object>
- DROP CONNECTION
- DROP DATABASE
- DROP EXTERNAL TABLE
- DROP FILE FORMAT
- DROP FUNCTION
- DROP INTEGRATION
- DROP MANAGED ACCOUNT
- DROP MASKING POLICY
- DROP MATERIALIZED VIEW
- DROP NETWORK POLICY
- DROP PIPE
- DROP PROCEDURE
- DROP RESOURCE MONITOR
- DROP ROLE
- DROP ROW ACCESS POLICY
- DROP SCHEMA
- DROP SEQUENCE
- DROP SESSION POLICY
- DROP SHARE
- DROP STAGE
- DROP STREAM
- DROP TABLE
- DROP TAG
- DROP TASK
- DROP USER
- DROP VIEW
- DROP WAREHOUSE
- EXECUTE IMMEDIATE
- EXECUTE TASK
- EXPLAIN
- GET
- GRANT OWNERSHIP
- GRANT <privileges> … TO ROLE
- GRANT <privilege> … TO SHARE
- GRANT ROLE
- INSERT
- INSERT (multi-table)
- LIST
- MERGE
- PUT
- REMOVE
- REVOKE <privileges> … FROM ROLE
- REVOKE <privilege> … FROM SHARE
- REVOKE ROLE
- ROLLBACK
- SELECT
- SET
- SHOW <objects>
- SHOW COLUMNS
- SHOW CONNECTIONS
- SHOW DATABASES
- SHOW DELEGATED AUTHORIZATIONS
- SHOW EXTERNAL FUNCTIONS
- SHOW EXTERNAL TABLES
- SHOW FILE FORMATS
- SHOW FUNCTIONS
- SHOW GLOBAL ACCOUNTS
- SHOW GRANTS
- SHOW INTEGRATIONS
- SHOW LOCKS
- SHOW MANAGED ACCOUNTS
- SHOW MASKING POLICIES
- SHOW MATERIALIZED VIEWS
- SHOW NETWORK POLICIES
- SHOW OBJECTS
- SHOW ORGANIZATION ACCOUNTS
- SHOW PARAMETERS
- SHOW PIPES
- SHOW PRIMARY KEYS
- SHOW PROCEDURES
- SHOW REGIONS
- SHOW REPLICATION ACCOUNTS
- SHOW REPLICATION DATABASES
- SHOW RESOURCE MONITORS
- SHOW ROLES
- SHOW ROW ACCESS POLICIES
- SHOW SCHEMAS
- SHOW SEQUENCES
- SHOW SESSION POLICIES
- SHOW SHARES
- SHOW STAGES
- SHOW STREAMS
- SHOW TABLES
- SHOW TAGS
- SHOW TASKS
- SHOW TRANSACTIONS
- SHOW USER FUNCTIONS
- SHOW USERS
- SHOW VARIABLES
- SHOW VIEWS
- SHOW WAREHOUSES
- TRUNCATE MATERIALIZED VIEW
- TRUNCATE TABLE
- UNDROP <object>
- UNDROP DATABASE
- UNDROP SCHEMA
- UNDROP TABLE
- UNDROP TAG
- UNSET
- UPDATE
- USE <object>
- USE DATABASE
- USE ROLE
- USE SCHEMA
- USE SECONDARY ROLES
- USE WAREHOUSE
- DDL Commands
- DML Commands
- Query Syntax
- Query Operators
- SQL Function Reference
- Snowflake Scripting Reference
- API Reference
- Appendices
- Categories:
SHOW SHARES¶
Provider sharing not enabled for all accounts
Provider sharing is enabled by default for most, but not all accounts.
If you encounter errors when attempting to share data with consumers, the feature may not be enabled for your account. To inquire about enabling it, please contact Snowflake Support.
Lists all shares available in the system:
Outbound shares (to consumers) that have been created in your account (as a provider).
Inbound shares (from providers) that are available for your account to consume.
- See also:
Syntax¶
SHOW SHARES [ LIKE '<pattern>' ]
Parameters¶
LIKE 'pattern'
Filters the command output by object name. The filter uses case-insensitive pattern matching, with support for SQL wildcard characters (
%
and_
).For example, the following patterns return the same results:
... LIKE '%testing%' ...
... LIKE '%TESTING%' ...
Usage Notes¶
The command lists shares only for users with a role that has the IMPORT SHARE privilege:
By default, the ACCOUNTADMIN role has this privilege.
A user with the ACCOUNTADMIN role can delegate this privilege. See Enabling non-ACCOUNTADMIN Roles to Perform Data Sharing Tasks.
If a user without the IMPORT SHARE privilege runs this command, no shares are listed.
Note
Executing this command without sufficient privileges returns empty results.
The command does not require a running warehouse to execute.
The command returns a maximum of 10K records for the specified object type, as dictated by the access privileges for the role used to execute the command; any records above the 10K limit are not returned, even with a filter applied.
To view results for which more than 10K records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.
To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.
Output¶
The
kind
column displays:INBOUND
indicates the share is available to your account to consume (i.e. you can create a database from the share).OUTBOUND
indicates that your account is sharing data with other accounts and this share was created in your account.
For
OUTBOUND
shares, if accounts have been added to the share, theto
column displays these accounts. The maximum number of accounts displayed in this column is three; however, there is no hard limit on the number of accounts that can be added to a share.
Examples¶
Show all shares that have been created in your account or are available to consume by your account:
SHOW SHARES; +-------------------------------+----------+-------------------------+-----------------------+------------------+--------------+----------------------------------------+ | created_on | kind | name | database_name | to | owner | comment | |-------------------------------+----------+-------------------------+-----------------------+------------------+--------------+----------------------------------------| | 2016-07-09 19:18:09.821 -0700 | INBOUND | SFC_SAMPLES.SAMPLE_DATA | SNOWFLAKE_SAMPLE_DATA | | | Sample data sets provided by Snowflake | | 2017-06-15 17:02:29.625 -0700 | OUTBOUND | AB67890.SALES_S | SALES_DB | XY12345, YZ23456 | ACCOUNTADMIN | | +-------------------------------+----------+-------------------------+-----------------------+------------------+--------------+----------------------------------------+