Instance and Storage

In this article, I will tell you about the basic components of Oracle database (storage) and instance and their architecture.

Instance

Instance consists of two components

  • SGA
  • Processes

SGA

SGA (a.k.a System Global Area or Shared Global Area) represents the memory components from computing architecture. It is shared by all users connected to the database.

The primary components of SGA are:

  • Shared Pool
    • Library cache – all executable queries are stored here
    • data dictionary cache – all system metadata are stored here
  • Buffer cache – all data from storage brought to memory are stored here (any data you query) – the processing happens here
  • Redo Log buffer – whenever you do any changes to your data, it is stored here
  • Streams pool –  this pool stores messages in a queue for Oracle Streams; advanced queueing
  • Large pool – this is used for large operations (parallel, direct queries, restore, backup, …)
  • Java pool – used for instances of Java classes, …

Processes

Processes represent the CPU component from computing architecture. There are several processes running in Oracle nonetheless I will be talking about 5 main processes that are crucial/essential for Oracle; Without them, Oracle will not be able to operate smoothly and keep data consistent.

  • SMON – System monitor; takes care about recovery
  • PMON – Process monitor; monitors all the other processes (whether they are working fine)
  • CKPT – Checkpoint; ensures that all changes are synced into data files and redo log files
  • LGWR – Log writer; is responsible to write all changes from Redo Log buffer into Redo Log file (in chronological order)
  • DBWR – Database writer; is responsible for writing changes (a.k.a. “dirty buffers”) into data files

Storage

Storage has several components but I will talk about the 5 main files. This component stores literally all data in files according to their nature.

I describe all these files in detail in the article Database files

  • Data file – this is where all data reside (user data or system data)
  • Config file – this file stores information about database configuration (such as what is the database name, where are data files stored, ….)
  • RedoLog file – all changes done in a database are stored in this file (very important file !!!)
  • Password file – stores SYS user password (other users’ passwords are stored in data files)
  • Parameter file (a.k.a. PFILE / SPFILE) – stores all the parameters for a successful start of the instance

Here is a diagram introducing all important components mentioned above. These are the main parts and it is fundamental to understand how they work to be able to understand the following articles.