Beruflich Dokumente
Kultur Dokumente
Process Monitor database to access data. When a user connects to the database, a
(PMON) process known as a User process is started on behalf of the user on
the client machine. If the user terminates his/her session abnormally,
resources that were being used by the user session continue to remain
attached until the PMON background process cleans it up. The PMON
background process is responsible for cleaning the resources such
locks on tables being held by failure user processes. The process also
restarts dead dispatcher processes.
User Processes
A user trying to access data in the database needs to make a connection with the database using an
appropriate tool such as SQL*Plus, iSQL*Plus and a front-end database interface tool. A connection is a
communication pathway created between a user process and the Oracle Server. The user has to first supply
proper authentication credentials. Once the users credentials are validated a user session is established
and a user process is created on the client-side to act on behalf of the user. This process remains active
till the user completes the session. In the event that a user process is terminated abnormally the PMON
background process cleans up the resources that were held by the user process.
Server Processes
Server processes are created in Oracle to handle requests made by user processes. Server processes are
always started on the Server side. They are responsible for responding to the user process with appropriate
results. Based on the mode in which a database operates either a 1:1 ratio or m:n exists between user and
server processes. In Oracle, the instance can operate in one of two modes:
Dedicated server mode: Once a user process is started, a server process is created on behalf of the user
process. A one-to-one ratio is maintained between user and server processes. The server process
remains attached to the user process as long as the user process is active. The server process remains
idle during periods of inactivity. The server process is responsible for satisfying all requests made by the
user process and responding with appropriate results. The server process communicates with the Oracle
server using the Oracle Program Interface (OPI). The disadvantage of this is that in an OLTP
environment where there can be many thousands of users accessing the database simultaneously, a
large number of server processes would need to be active.
Shared Server Mode: In this environment a pool of shared server processes satisfy the required of user
processes. A one-to-one ratio is not maintained as in the dedicated server mode. A user process can be
serviced by any available server process. This mode of operating is particularly useful in large multi-user
online transaction processing (OLTP) environments, where many users concurrently access the
database using short transactions. The shared server environment is discussed as a separate chapter
in this book.
The Program Global Area (PGA)
This is memory area that is associated with a server process. It contains data and control information held
by a single server process or background process. It is created when a user process is created and is
released when the user process is terminated. This memory area is not shared by server processes. The
contents of the PGA however vary in dedicated and shared server environments. The PGA is used to
process SQL statements and to hold logon and other session information. The contents of the PGA include:
Private SQL area contains bind information and runtime memory structures.
Each session that issues a SQL statement has a private SQL area. The private SQL area is in turn made
up the Persistent area that contains bind information and a Runtime area that is created as soon as an
execute request is initia In a dedicated server environment the Private SQL area is created in the
Program Global Area (PGA) of their server process. In a shared server environment, it is located in the
System Global area. The number of private SQL areas that a user process can allocate is limited to the
OPEN_CURSORS initialization parameter that takes a default value of 50.
Session Memory This is a memory area that holds a sessions variables and session-related inform In
a shard server environment, this memory area is located in the SGA and is shared by server processes.
SQL Work area This memory area is used for operations such as Sorting, Hash- joins, Bitmap Merge
and Bitmap Create operatio.
LAB SESSION
1)How to know the sga parameters values?
SQL>show parameter sga;
2)how to know the pga parameters values?
SQL>show parameter pga;
NOTE: Here ps means process status , e means extxa option , f means full list and grep menas PICK.
3)how to know the database is up or not from the root level?
SQL>ps ef | grep smon*;
4)how to know which users are connected to database?
SQL>ps ef | grep pmon*;
5) how to display all oracle background processes?
SQL>ps ef | grep ora_; (it displays all backgroung processes)
6)how to identify the sga&pga?
SQL>set wrap off
SQL>select * from v$sgastat;
7) How to identify the dispatcher threads?
SQL>show parameter dispatchers;
8) How to identify shared server processes?
SQL>show parameter shared_server_processes;