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 :

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