Oracle Database - Connect Identifier

1 - About

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 :

One of the most common connect identifiers is a net service name, a simple name for a service.

Here below a connection with the connect command of SQL Plus (but you can initiate a connection with an other client such as SQL developer of code)

CONNECT username@connect_identifier

3 - Syntax

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)
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@'[email protected]"Fast"' 

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" 
db/oracle/connect_identifier.txt ยท Last modified: 2017/09/06 19:27 by gerardnico