Oracle Server Architecture


 It can be categorized into three
    1. User process
    2. Logical memory structure (Oracle instances)
    3. Physical file structure (Database)
 
Database represent the physical files that store data. Instance is composed memory structure & background processes. Each DB should have at least one instances.Multiple instances can access single DB. It is possible by RAC-Real Application Cluster.Process & memory structure are called an instances. Storage structure are called a database.Instances & Database called as oracle server.

 User Process
    Two type of process allow a user to interact with the instance and with database, they are user process and server process.When user request anything, Oracle start user process to support the user connection to the instances. User process initiate a connection to the instances. (Oracle call the process of initiating and maintaining communication b/w user process and instances is called a connection, Once connection made, the user establish a session in the instances). 

    Once session is established, user can start a server process on host server itself. Server process is responsible for performing task on database. Memory structure has PGA - Program Global Area. PGA is created for each user, Its store user specific session info such as bind variables and session variables. PGA is not shared and each server process has a PGA. DBA job is to set total memory allocated to all the PGA memory to all server and background process.

Note: each user process connect to one server process only. Multiple user process can share single server process.


Oracle Instances:
    Instances consists of main memory structure called SGA - System Global Area and several background process.SGA is shared memory area. All user of DB share the information maintained in this area. Oracle will allocate memory for SGA when the instances is started and deallocated it when the instances is shutdown. SGA require three required components
  1. Shared pool - Caches most recently used SQL Statement issued by DB users.
  2.  DB buffer cache - Caches data that mostly accessed by DB users.
  3.  Redo log buffer - Store transaction info for recovery purpose.
SGA four optional components
  1. Java pool - Caches most recently used java objects and application codes when oracle JVM is used.
  2. Large pool - Caches data for large operations RMAN, Backup & restore activities.
  3. Streams pool - Caches data associated with queued message request, If oracle advance queuing option is used.
  4.  Result cache - New area for oracle g, It stores result of SQL queries and PL/SQL fun for better performances. 

Previous
Next Post »