SQL Plus - Connect

Card Puncher Data Processing

About

CONNECT is a SQLPlus command that permits to make a connection as a user with a database (instance of).

Syntax

CONN[ECT] [{logon|/|proxy}
[AS {SYSASM|SYSBACKUP|SYSDBA|SYSDG|SYSOPER|SYSRAC|SYSKM}]
[edition=value]]

where:

  • logon has the following syntax: username/password@connect_identifier
  • proxy has the syntax: proxyuser[username]/password@connect_identifier
  • {SYSASM|SYSBACKUP|SYSDBA|SYSDG|SYSOPER|SYSRAC|SYSKM} are the database privilege
  • edition specify the database edition to use (same effect than the ORA_EDITION environment variable)

Example

Connect identifiers used in a connect string cannot contain spaces, unless enclosed within single quotes (') or double quotes (“). In the following examples, a connect identifier and a connect descriptor that contain spaces are enclosed within single quotes:

CONNECT scott/tiger@'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)))'
CONNECT scott/tiger@'cn=sales, cn=OracleContext, dc=us, dc=acme, dc=com'

Single quotes (') are required if a double quote (”) is used in a connect identifier. For example:

CONNECT scott/tiger@'sales@Good"Fast"Food.com' 

Likewise, double quotes (“) are required if a single quote (') is used in a connect identifier. For example:

CONNECT scott/tiger@"cn=sales, cn=OracleContext, ou=Mary's Dept, o=acme" 





Discover More
Card Puncher Data Processing
Oracle Database - Connect Identifier

A connect idenfier is the part of the connect string when a users initiate a connection to designate the service to which they want to connect to. The connect identifier is : a connect descriptor....
Card Puncher Data Processing
SQL Plus - Command Reference

Commands Description @ @@ / ACCEPT APPEND ARCHIVE ATTRIBUTE BREAK BTITLE CHANGE CLEAR COLUMN COMPUTE CONNECT COPY Copies data from a query to a table in the same or another...
Card Puncher Data Processing
SQL Plus - Help

The help command of SQL Plus connection because SQL Plus will fired the following SQL in order to retrieve the documentation. To install the help on a instance:



Share this page:
Follow us:
Task Runner