SQL Plus - Connect

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:

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/[email protected]'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)))'
CONNECT scott/[email protected]'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/[email protected]'[email protected]"Fast"Food.com' 

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

CONNECT scott/[email protected]"cn=sales, cn=OracleContext, ou=Mary's Dept, o=acme" 

Powered by ComboStrap