Oracle Database Architecture (Part 01)





The Oracle server architecture can be described in three categories:
  1. Server processes that communicate with users processes and interact with an Oracle instance to fulfill requests
  2. Logical memory structures and background processes that are collectively called an Oracle instance
  3. Physical file structures that are collectively called a database
Each database should have at least one instance associated with it. It is possible for multiple instances to access a single database; such a configuration is known as Real Application Clusters (RAC) .

Oracle Database 12c allows multitenancy, meaning, you can have more than one database in a structure called a container database. The database overhead will be shared by all the databases in the container database. The databases in the container database are called pluggable databases.



User vs Schema 
A user is a defined database entity that has a set of abilities to perform activities based on their granted rights. A schema, which is associated with a user entity, is more appropriately defined as a collection of database objects.
The main difference is that users are the entities that perform work, and schemas are the collections of objects on which users perform work.

At the user level, two types of processes allow a user to interact with the instance
  1. User process.
  2. Server process.
Whenever a user runs an application, such as HR application, Oracle starts a user process to support the user’s connection to the instance. Depending on the technical architecture of the application, the user process exists either on the user’s own computer or on the middle-tier application server. The user process then initiates a connection to the instance. Once the connection is made, the user establishes a session in the instance.

After establishing a session, each user starts a server process on the host server itself.
It is this server process that is responsible for performing the tasks that actually allow the user to interact with the database. the server processes are allowed to interact with the instance, but not the user process directly .

Each user process connects to one and only one server process.

The user and server processes that are associated with each user connection, 
an additional memory structure called the program global area (PGA) is also created for each server process. the PGA stores user-specific session information such as bind variables and session variables.
Every server process on the server has a PGA memory area.


PGA memory is not shared. Each server process has a PGA associated with it and is exclusive.
The components of PGA are : 
  1. SQL Work Area : Area used for memory-intensive operations such as sorting or building a hash table during join operations.
  2. Private SQL Area : Holds information about SQL statement and bind variable values.



Practical : 

How to find server
process ? 
Connect to Oracle database via SQL*Plus
##This in turn starts another process that connects to the instance (server process with process ID 10606) owned by database server user oracle.

$ ps -ef |grep sqlplus | grep -v grep
James 10604 10511 0 01:51 pts/2 00:00:00 sqlplus

$ ps -ef |grep 10604 | grep -v grep
James 10604 10511 0 01:51 pts/2 00:00:00 sqlplus
oracle 10606 10604 0 01:52 ? 00:00:00 oracleC12DB1


Next Post Previous Post
1 Comments
  • Anonymous
    Anonymous February 25, 2023 at 9:52 PM

    Very nice , continue.

Add Comment
comment url