|SQL*Plus User's Guide and Reference
Command Reference, 16 of 52
Connects a given username to Oracle.
where logon requires the following syntax:
Refer to the following list for a description of each term or clause:
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. See the PASSWORD command in this chapter for information about changing your password.
Consists of a Net8 connection string. The exact syntax depends upon the Net8 communications protocol your Oracle installation uses. For more information, refer to the Net8 manual appropriate for your protocol or contact your DBA. SQL*Plus does not prompt for a service name, but uses your default database if you do not include a specification.
Represents a default logon using operating system authentication. You cannot enter a net_service_name 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 Oracle8i Administrator's Guide for information about operating system authentication.
CONNECT commits the current transaction to the database, disconnects the current username from Oracle, and reconnects with the specified username.
If you log on or connect as a user whose account has expired, SQL*Plus prompts you to change your password before you can connect.
If an account is locked, a message is displayed and connection into that account (as that user) is not permitted until the account is unlocked by your DBA.
For more information about user account management, refer to the CREATE and ALTER USER commands, and the CREATE PROFILE command in the Oracle8i SQL Reference.
To connect across Net8 using username SCOTT and password TIGER to the database known by the Net8 alias as FLEETDB, enter
To connect using username SCOTT, letting SQL*Plus prompt you for the password, enter
For more information about setting up your password file, refer to the Oracle8i Administrator's Guide.
To use a password file to connect to an instance on the current node as a privileged user named SCOTT with the password TIGER, enter
Note, that your default schema is now SYS, not SCOTT.