Oracle Server Manager User's Guide

Contents Index Home Previous Next

CONNECT

Purpose

Connect to a database using the specified username.

Prerequisites

Only valid username/password combinations can successfully connect. The AS clause allows users to connect to an instance with a default schema of SYS for database administration. Users connecting as SYSOPER or SYSDBA must have the necessary privileges to access the SYS schema.

Syntax

CONNECT command ::=

where:

username Any valid Oracle username for the current database. It can be a null string. If neither username nor INTERNAL is specified, you are prompted for a username and password.
password The password corresponding to the specified username. Password can be a null string.
instance-path A valid specification for an instance/database combination. If an instance is specified, it becomes the current instance for the duration of the connection. It does not become the default instance for subsequent connections.
SYSOPER/ SYSDBA The AS clause allows privileged connections by users who have been granted SYSOPER or SYSDBA system privileges, if using a password file, or their operating system equivalents, if using OS authentication.
/ Uses operating system authentication.
INTERNAL Connects as username SYS via keyword INTERNAL. Should be used rarely and only by the DBA for certain maintenance purposes; requires operating system privileges. CONNECT INTERNAL is supported for backwards compatibility only.

Line Mode Behavior

In line mode, if you omit the password, Server Manager prompts you for one. If you omit both the username and password, Server Manager prompts you for both.

SQL Worksheet Behavior

In a SQL Worksheet, if you omit the username argument, Server Manager brings up the Connect dialog box.

Usage Notes

If only the Oracle username is specified, the password is requested using the prompt "Password:". The entered password is not echoed.

CONNECT can be used without a DISCONNECT to connect to another username.

The connect is always accompanied by the opening of a cursor.

You can specify an instance path for a remote instance when connecting. If you attempt a connection to a remote instance, authentication occurs on the remote node, so you must have the appropriate privileges on the remote node.

Connecting as SYSOPER or SYSDBA over a Non-Secure Connection

To connect to Oracle as a privileged user over a non-secure connection, you must satisfy the following conditions:

For information about creating a password file, see the Oracle7 Server Concepts and the Oracle7 Server Administrator's Guide,

Connecting as SYSOPER or SYSDBA over a Local or Secure Connection

To connect to Oracle as a privileged user over a local or a secure connection, you must satisfy either of the following sets of conditions:

Additional Information: For information about operating system authentication, see your operating system-specific Oracle documentation.

Examples

To connect to an instance on the current default node, enter:

CONNECT 

To connect to an instance on the current node as username SCOTT with password TIGER, enter:

CONNECT scott/tiger 

To use a password file to connect to an instance on the current node as a privileged user named SCOTT with password TIGER, enter:

CONNECT scott/tiger AS SYSDBA

Note that your default schema is now SYS, not SCOTT.

To perform the same connection using OS authentication, enter:

CONNECT / AS SYSDBA

To connect to an instance on a different node as username SCOTT with password TIGER, enter:

CONNECT scott/tiger@instance-path 

Connecting as INTERNAL

Using Server Manager you can connect as INTERNAL to a release 7.0 database. CONNECT INTERNAL is supported for backwards compatibility only. For information on how to use CONNECT INTERNAL, refer to your Oracle7 Server Administrator's Guide.


Contents Index Home Previous Next