Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:  Databricks SQL
 Databricks SQL  Databricks Runtime 13.3 LTS and above
 Databricks Runtime 13.3 LTS and above  Unity Catalog only
 Unity Catalog only
Transfers the ownership of a connection to a new principal, renames a connection, or changes the connection options.
To set a comment on a connection use COMMENT ON CONNECTION.
Syntax
ALTER CONNECTION connection_name
 { [ SET ] OWNER TO principal |
   RENAME TO new_connection_name |
   OPTIONS ( option value [, ...] )
Parameters
- 
The name of the connection to be altered. 
- [ SET ] OWNER TO principal - Transfers ownership of the connection to - principal.
- RENAME TO new_connection_name - Specifies a new name for the connection. The name must be unique within the Unity Catalog metastore. 
- OPTIONS - Sets - connection_typespecific parameters needed to establish the connection.- Replaces the existing list of options with a new list of options. - option - The property key. The key can consist of one or more identifiers separated by a dot, or a - STRINGliteral.- Property keys must be unique and are case-sensitive. 
- value - The value for the property. The value must be a - BOOLEAN,- STRING,- INTEGER, or- DECIMALconstant expression.- For example a the - valuefor- passwordmay be using the constant expression- secret('secrets.r.us', 'postgresPassword')as opposed to entering the literal password.
 
Examples
> ALTER CONNECTION mysql_connection SET OWNER TO `alf@melmak.et`;
> ALTER CONNECTION mysql_connection RENAME TO `other_mysql_connection`;
> ALTER CONNECTION mysql_connection OPTIONS (host 'newmysqlhost.cn-north-2.amazonaws.com', port '3306');