Oracle Database - Connect String (Client Connection Initiation)

Card Puncher Data Processing


Users initiate a connection request to a database service by providing a connect string.

A connect string includes:

A connect identifier can be the connect descriptor itself or a name that resolves to a connect descriptor.

One of the most common connect identifiers is a net service name, a simple name for a service. The following examples demonstrate one connect string that uses a complete connect descriptor as the connect identifier and another connect string that uses net service name sales as the connect identifier.

Syntax: Connecting to a Database

From the command line

tool username@connect_identifier
Enter password: password

Example with SQLPlus on a shell

sqlplus username/password@connect_identifier

From within SQL*Plus

In SqlPlus with the CONNECT command:

CONNECT username/password@connect_identifier

From a login screen


From a 3GL application

Applications written in 3GL, such as oci and pre-compilers, are used by middle-tier and database application developers for direct database access from a client program.

exec sql connect :username identified by :password 

In the preceding connection request, :username and :password are 3GL variables that can be set within the program either statically or by prompting the user.

Connect string example with as the connect identifier

a complete connect descriptor

CONNECT scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server1)(PORT=1521))

a net service name

CONNECT scott/tiger@sales

Connection Process

When net service name is used, connection processing takes place by first mapping sales to the connect descriptor. This mapped information is stored in one or more repositories of information that are accessed with naming methods.

The process for establishing a client session with the aid of a naming method is as follows:

  1. The client initiates a connect request by providing a connect identifier.
  2. The connect identifier is resolved to a connect descriptor by a naming method. This information is returned to the client.
  3. The client makes the connection request to the address provided in the connect descriptor.
  4. A listener receives the request and directs it to the appropriate database server.
  5. The connection is accepted by the database server.

Discover More
Card Puncher Data Processing
Oracle Database - Connect Descriptor (TNS Connect String)

The Connect Descriptor (known also as TNS Connect String) is a type of connect identifier. It defines the parameters that need the Oracle Net Service to connect to a database service : the protocol...
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....
Oracle Database One Service For Each Database
Oracle Database - Database Service

An Oracle database is represented to clients as a service. A database can have one or more services associated with it. When an instance starts, it registers itself with a listener using one or more service...
Card Puncher Data Processing
Oracle Database - tnsnames.ora

Located primarily on the clients, this file contains net service names mapped to connect descriptors and is a part of the local naming method in order to make a database connection. TNS_ADMINORACLE_HOME...
Edlivery Oracle Bi
PowerCenter - Installation and Configuration (8.6.1 for Windows 32Bit)

This article talk the installation of PowerCenter from Informatica on: Windows 32 bit Oracle Database Oracle Business Intelligence Application version installation The oracle database...
Powercenter 901 Installation License And Directory
PowerCenter - Installation and Configuration (9.0.1 for OEL Linux 64Bit)

Text format: ... Installation Type: Install (and not upgrade) Pre-requisites: Next License and Directory. (Transfer the license file from the client zip file) Pre-Installation Summary: Install...

Share this page:
Follow us:
Task Runner