Categories:

Account & Session DDL

ALTER CONNECTION

Modifies the properties for an existing connection.

See also:

CREATE CONNECTION , DROP CONNECTION , SHOW CONNECTIONS

In this Topic:

Syntax

ALTER CONNECTION <name> ENABLE FAILOVER TO ACCOUNTS <organization_name>.<account_name> [ , <organization_name>.<account_name> ... ] [ IGNORE EDITION CHECK ]

ALTER CONNECTION <name> DISABLE FAILOVER [ TO ACCOUNTS <organization_name>.<account_name> [ , <organization_name>.<account_name> ... ] ]

ALTER CONNECTION <name> PRIMARY

ALTER CONNECTION [ IF EXISTS ] <name> SET COMMENT = '<string_literal>'

ALTER CONNECTION [ IF EXISTS ] <name> UNSET COMMENT

Parameters

name

Identifier for the connection to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

ENABLE FAILOVER TO ACCOUNTS organization_name.account_name [ , organization_name.account_name ... ]

Specifies a comma-separated list of accounts in your organization where a secondary connection for this primary connection can be promoted to serve as the primary connection. Include your organization name for each account in the list.

DISABLE FAILOVER [ TO ACCOUNTS organization_name.account_name [ , organization_name.account_name ... ] ]

Disables failover for this primary connection, meaning no secondary connection for this primary connection can be promoted to serve as the primary connection.

To disable failover to selected accounts (rather than to all accounts), specify a comma-delimited list of those accounts.

PRIMARY

Promote connection to serve as primary connection.

SET ...

Specifies the properties to set for the connection:

COMMENT = 'string'

Adds a comment or overwrites an existing comment for the connection.

UNSET ...

Specifies the properties to unset for the connection, which resets them to the defaults.

Currently, the only property you can unset is COMMENT, which removes the comment, if one exists, for the connection.

Usage Notes

  • Only account administrators (users with the ACCOUNTADMIN role) can execute this SQL command.

Examples

Allow accounts myaccount2 and myaccount3 in the myorg organization to each store a secondary connection for the myconnection connection:

ALTER CONNECTION myconnection ENABLE FAILOVER TO ACCOUNTS myorg.myaccount2, myorg.myaccount3;

Add a comment for a connection:

ALTER CONNECTION myconnection SET COMMENT = 'New comment for connection';

Promote a secondary connection to primary connection:

ALTER CONNECTION myconnection PRIMARY;