Connects a given username to Oracle.
Syntax
CONN[ECT] [logon]
where:
logon | Requires the following syntax: username[/password][@database_specification]|/ |
Refer to the following list for a description of each term or clause:
username [/password] | Represent the username and password with which you wish to connect to Oracle. If you omit username and password, SQL*Plus prompts you for them. If you enter a slash (/) or simply enter [Return] to the prompt for username, SQL*Plus logs you in using a default logon (see "/" below). |
If you omit only password, SQL*Plus prompts you for password. When prompting, SQL*Plus does not display password on your terminal screen. | |
/ | Represents a default logon using operating system authentication. You cannot enter a database_specification if you use a default logon. In a default logon, SQL*Plus typically attempts to log you in using the username OPS$name, where name is your operating system username. See the Oracle7 Server Administrator's Guide for information about operating system authentication. |
database specification | Consists of a SQL*Net connection string. The exact syntax depends upon the SQL*Net communications protocol your Oracle installation uses. For more information, refer to the SQL*Net manual appropriate for your protocol or contact your DBA. SQL*Plus does not prompt for a database specification, but uses your default database if you do not include a specification. |
CONNECT commits the current transaction to the database, disconnects the current username from Oracle, and reconnects with the specified username.
Examples
To connect across SQL*Net using username SCOTT and password TIGER to the database known by the SQL*Net alias as FLEETDB, enter
SQL> CONNECT SCOTT/TIGER@FLEETDB
To connect using username SCOTT, letting SQL*Plus prompt you for the password, enter
SQL> CONNECT SCOTT