Creates a new connection in the account. For more details, see Redirecting Client Connections.
CREATE CONNECTION [ IF NOT EXISTS ] <name> [ COMMENT = '<string_literal>' ]
CREATE CONNECTION [ IF NOT EXISTS ] <name> AS REPLICA OF <organization_name>.<account_name>.<name> [ COMMENT = '<string_literal>' ]
String that specifies the identifier (i.e. name) for the connection. The identifier must start with an alphabetic character and may only contain letters, decimal digits (0-9), and underscores (_).
The name of each primary connection must be unique across connection names and account names in the organization.
The name of each secondary connection must match the name of its primary connection.
Secondary Connection Parameters¶
AS REPLICA OF organization_name.account_name.name
Specifies the identifier for a primary connection from which to create a replica (i.e. a secondary connection).
Specifies the identifier for the organization.
Specifies the identifier for the account.
Specifies the identifier for the primary connection.
COMMENT = 'string_literal'
Specifies a comment for the connection.
Default: No value
Access Control Requirements¶
Only account administrators (users with the ACCOUNTADMIN role) can execute this SQL command.
If Private Connectivity to the Snowflake Service is enabled for your Snowflake account, your network manager must create and manage a DNS CNAME record. For more details, see Configuring the DNS CNAME Record for Private Connectivity to the Snowflake Service.
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata Fields in Snowflake.
Create a connection for the account
myaccount1 in the organization
CREATE CONNECTION IF NOT EXISTS myconnection;
Create a secondary connection as a replica of its primary connection. The
primary column in the output of
SHOW CONNECTIONS displays the primary connection:
CREATE CONNECTION myconnection AS REPLICA OF myorg.myaccount1.myconnection;