SHOW CONNECTIONS¶
Lists the connections for which you have access privileges.
The output returns connection metadata and properties, ordered by connection name (see Output in this topic for descriptions of the output columns). This is important to note if you wish to filter the results using the provided filters.
- See also:
Syntax¶
SHOW CONNECTIONS [ LIKE '<pattern>' ]
Parameters¶
LIKE 'pattern'
Optionally 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%' ...
. Default: No value (no filtering is applied to the output).
Output¶
The command output provides connection properties and metadata in the following columns. The command output for organizations that span multiple region groups includes an additional
region_group
column.
Column |
Description |
---|---|
|
Region group where the account is located. Note: This column is only displayed for organizations that span multiple region groups. |
|
Snowflake Region where the account is located. A Snowflake Region is a distinct location within a cloud platform region that is isolated from other Snowflake Regions. A Snowflake Region can be either multi-tenant or single-tenant (for a Virtual Private Snowflake account). |
|
Date and time when the connection was created. |
|
Name of the account. An organization administrator can change the account name. |
|
Name of the connection. |
|
Comment for the connection. |
|
Indicates whether the connection is a primary connection. |
|
Organization name, account name, and connection name of the primary connection. This value can be copied into the AS REPLICA OF clause of the CREATE CONNECTION command when creating secondary connections. |
|
A list of any accounts that the primary connection can redirect to. |
|
Connection URL that users pass to a client to establish a connection to Snowflake. |
|
Name of your Snowflake organization. |
|
Account locator in a region. |
For more information about the properties that can be specified for a connection, see CREATE CONNECTION.
Usage notes¶
Only account administrators (users with the ACCOUNTADMIN role) can execute this SQL command.
The command doesn’t require a running warehouse to execute.
The command only returns objects for which the current user’s current role has been granted at least one access privilege.
The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.
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.
Examples¶
Show all the connections whose name starts with test
:
SHOW CONNECTIONS LIKE 'test%';