What is the difference between Oracle's processes, sessions, and connections

Source: Internet
Author: User
Tags sessions dedicated server oracle database

--========================

--Differences between processes, sessions, connections

--========================

When using Oracle database, connecting to the session is one of the words we often encounter. It looks like one thing, but the fact is not. A connection can be built with 0,

One or even more sessions. Ah, how about this? Yes. This is why we often misunderstand.

Individual sessions are separate and separate from other sessions, even for multiple sessions of the same connection.

Definitions between several terms (refer to Oracle 9i &10G programming Art)

Connection (Connection): A connection is a physical path from the customer to an Oracle instance. Connections can be established on the network or through the IPC mechanism. Usually in

The client process establishes a connection between a dedicated server or a scheduler.

Session: A session is a logical entity that exists in an instance. This is your session state, which is a set of memory that represents a particular session

. When it comes to "database connection", most people think of "session" first. You want to execute SQL, commit transactions, and run stored procedures on a session in the server.

Second, through the example demonstration to see the relationship between

1. No connection, no session, no process situation

[--> No session server process was established when the connection was established

[Oracle@odbp ~]$ Ps-ef | grep ORACLEORCL

Oracle 5685 5446 0 19:30 pts/1 00:00:00 grep ORACLEORCL

[ORACLE@ODBP ~]$ Sqlplus/nolog

Sql*plus:release 10.2.0.4.0-production on Mon June 27 19:30:49 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Idle> Ho Ps-ef | grep oracleorcl--> Using Nolog logins is also not seeing any session server processes

Oracle 5691 5686 0 19:31 pts/0 00:00:00/bin/bash-c ps-ef | grep ORACLEORCL

2. Single connection, single session, single process

--> log in with Scott, and a corresponding server process is generated

Idle> Conn Scott/tiger

Connected.

Scott@orcl> Select Sid,serial#,username from v$session where username are not null;

SID serial# USERNAME

---------- ---------- -------------------------

159 5 SCOTT

Scott@sql> Ho Ps-ef | grep ORACLEORCL

Oracle 5696 5686 0 19:32? 00:00:00 ORACLEORCL (description= (Local=yes) (address= (PROTOCOL=BEQ))

Oracle 5699 5686 0 19:32 pts/0 00:00:00/bin/bash-c ps-ef | grep ORACLEORCL

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.