Connections and Sessions

Establishing a Connection

Before users can submit SQL statements to an Oracle database, they must connect to an instance.

  • The user starts a tool such as SQL*Plus or runs an application developed using a tool such as Oracle Forms. This application or tool is executed as a user process.
  • In the most basic configuration, when a user logs on to the Oracle server, a process is created on the computer running the Oracle server. This process is called a server process. The server process communicates with the Oracle Instance on behalf of the user process that runs on the client. The server process executes SQL statements on behalf of the user.


A connection is a communication pathway between a user process and an Oracle server. A database user can connect to an Oracle server in one of three ways:

  • The user logs on to the operating system running the Oracle Instance and starts an application or tool that accesses the database on that system. The communication pathway is established using the interprocess communication mechanisms available on the host operating system.
  • The user starts the application or tool on a local computer and connects over a network to the computer running the Oracle Instance. In this configuration, called client-server, network software is used to communicate between the user and the Oracle server.
  • In a three-tiered connection, the user’s computer communicates over the network to an application or a network server, which is connected through a network to the machine running the Oracle Instance. For example, the user runs a browser on a computer on a network to use an application residing on an NT server that retrieves data from an Oracle database running on a UNIX host.


A session is a specific connection of a user to an Oracle server. The session starts when the user is validated by the Oracle server, and it ends when the user logs out or when there is an abnormal termination. For a given database user, many concurrent sessions are possible if the user logs on from many tools, applications, or terminals at the same time. Except for some specialized database administration tools, starting a database session requires that the Oracle server be available for use.

Note: The type of connection explained here, where there is a one-to-one correspondence between a user and server process, is called a Dedicated Server connection. When using a Shared Server configuration, it is possible for multiple user processes to share server processes.


User Process

A database user who needs to request information from the database must first make a connection with the Oracle server. The connection is requested using a database interface tool, such as SQL*Plus, and beginning the user process. The user process does not interact directly with the Oracle server. Rather it generates calls through the user program interface (UPI), which creates a session and starts a server process.

Server Process

Once a user has established a connection, a server process is started to handle the user processes requests. A server process can be either a Dedicated Server process or a Shared Server process. In a Dedicated Server environment, the server process handles the request of a single user process. Once a user process disconnects, the server process is terminated. In a Shared Server environment, the server process handles the request of several user processes. The server process communicates with the Oracle server using the Oracle Program Interface (OPI).


One response to this post.

  1. Posted by Rajasekhar on August 21, 2010 at 4:15 am


    Good information . Thanx .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: