Oracle Architecture

This is a quick introduction to the Oracle architecture of Oracle 11g. There isn't the space here to go into depth so the intention is just to introduce some of the more important concepts and provide a high level overview of the Oracle 11g server architecture. 

One important point to bear in mind is that whilst there are differences between the architecture of different releases of Oracle, the differences are not all that great. There may be extra memory structures and background processes or the name of an object may change but the underlying Oracle architecture doesn't really change.

What we're going to cover are:
  • the main components of the Oracle architecture
  • Oracle server concepts and terminology
  • a high-level view of how the Oracle server works
  • the difference between a database and an instance
  • and Oracle database components 

Oracle Architecture Main Components

What most people regard as a database is in reality a database management system. In Oracle terminology this is known as the Oracle server. This consists of:

  • an Oracle instance - the memory structures and background processes
  • and a database - the physical files on disk used by the Oracle server

Oracle Instance

The Oracle instance does all of the work of the database management system - serving users and managing data. 

It is comprised of:

  • the system global area (SGA) - the area of memory allocated to the database by the operating system when the instance starts
  • the background processes

System Global Area (SGA)

The SGA comprises a number of separate memory structures: 

  • the database buffer cache which holds data blocks read from disk and  to be written to disk after being modified 
  • the shared pool which holds data dictionary information, the results of queries and other types of program data
  • the redo log cache which records changes made to data blocks before it is written to the online redo log files 
  • the large pool which is an optional data area used to allocate larger chunks of memory for use by, for example, the Recovery Manager (RMAN)
  • the Java pool which holds session-specific data used by Java stored procedures and the Java Virtual Machine (JVM)

Oracle Tips & Tricks to SKYROCKET Your Career!

If you're not already a subscriber you're  missing out on a myriad of tips and techniques to help you become a better, faster, smarter developer.Subscribe now and ignite your career.

  • the streams pool which is used only by the Oracle Streams capture and apply processes
  • the fixed SGA which is used for internal housekeeping including holding information about locks and the state of the database

Oracle Background Processes

When an Oracle instance starts, the background processes are started after the memory for the SGA is allocated. The background processes manage system activity and i/o, monitor other processes and maintain the integrity of the system.

Mandatory Background Processes

The exact Oracle architecture you have depends on your database configuration which determines which background processes run but every Oracle instance will have have the following background processes:

  • SMON - the system monitor process which performs instance recovery on startup if required, coalesces free space and monitors system activity to ensure the Oracle instance is in a valid state
  • PMON - the process monitor which monitors other server processes and performs recovery when a process fails
  • LGWR - the log writer process which writes the redo buffers to the online redo log files
  • RECO - the recoverer process which cleans up distributed transaction failures in distributed databases
  • DBWRn - the database writer process(es) which write changed data blocks from the database buffer cache to the data files
  • CKPT - the checkpoint process updates the control file and data file headers with checkpoint information and signals the database writer (DBWRn) processes to write changed data blocks to the data files
  • MMON and MMNL - the manageability monitor processes which collect data for the Automatic Workload Repository (AWR)

Optional Background Processes

These include:

  • ARCn - the archiver processes which archive inactive redo logs
  • CJQ0 and Jnnn - the job queue coordinator and slave processes which perform scheduled tasks for users
  • FBDA - the flashback data archiver process which writes the pre-change image of changed rows of tracked tables into Flashback Data Archives.
  • SMC0 - the space management coordinator process which coordinates space management related tasks

Slave Background Processes

These are processes that work on behalf of other processes

  • Innn - I/O slave processes which simulate asynchronous i/o for systems and devices that don't support it

Database (Files)

The final component in the Oracle architecture is the database. This comprises the physical files that hold information about the database. The various types of files in the database are:

  • data files - a database must have at least one data file containing the system data (information about the database such as the data dictionary) 
  • control files - this is a small file storing information about the physical structure of the database, they are usually multiplexed to reduce the risk of losing the control file 
  • redo log groups - at least 2 sets of redo log files must exist to store the information required to redo changes to data. Each group must comprise at least one file 
  • a parameter file - either text or binary which contains the parameter settings for the database a temp file - this is used to hold temporary data for example during sorting of results 
  • an undo file - this holds the undo data i.e. the pre-change image of changed data blocks
Return from Oracle architecture to Oracle 11g