iSQL*Plus User's Guide and Reference Release 9.0.1 Part Number A88826-01 |
|
Command Reference, 13 of 38
CONN[ECT] { logon | / } [AS {SYSOPER|SYSDBA}]
where logon requires the following syntax:
Connects a given username to Oracle.
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 enter a slash (/) or simply enter Return to the prompt for username, SQL*Plus logs you in using a default logon (see "/ (slash)" below).
connect_identifier
Consists of an Oracle Net connect identifier. The exact syntax depends upon the Oracle Net communications protocol your Oracle installation uses. For more information, refer to the Oracle Net 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.
/ (slash)
Represents a default logon using operating system authentication. You cannot enter a connect_identifier 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 Oracle9i Administrator's Guide for information about operating system authentication.
AS {SYSOPER|SYSDBA}
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 Oracle9i SQL Reference.
To connect across Oracle Net with username HR and password HR to the database known by the Oracle Net alias as FLEETDB, enter
CONNECT HR/HR@FLEETDB
To connect as user HR, letting SQL*Plus prompt you for the password, enter
CONNECT HR
For more information about setting up your password file, refer to the Oracle9i Administrator's Guide.
To use a password file to connect to an instance on the current node as a privileged user named HR with the password HR, enter
CONNECT HR/HR AS SYSDBA
To connect to an instance on the current node as a privileged default user, enter
CONNECT / AS SYSDBA
In the last two examples, your default schema becomes SYS.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|