2.2.2 NAME Connection Type
Connect to a database using a stored connection definition. Stored connections are identified using a unique connection name. For more information about stored connections, see Managing Stored Connections.
Options
Option | Description |
---|---|
-name, n | Specifies a connection type using a stored connection definition. |
-user, u | Specifies the user name. This is an alternative to providing it in the connection spec parameter. |
-url | Specifies the URL. This is an alternative to providing it in the connection spec parameter. |
-password, pw | Specifies the password. This is an alternative to providing it in the connection spec parameter. |
-role, r | Specifies the database role. This is an alternative to providing it in the connection spec parameter. |
-edition, ed | Specifies the Oracle database edition. This is an alternative to providing it in the connection spec parameter. |
-verbose, v | Requests output of diagnostic information about the connection. |
Parameters
Parameter | Description |
---|---|
<connectionspec> | Provides the connection specification for the target database. |
Examples
To connect using a stored connection:
SQL> CONNECT -name my_connection
To connect using a stored connection as a different user:
SQL> CONNECT -name myuser/mypassword@my_connection
or
SQL> CONNECT -name myuser@my_connection