Oracle Architecture

on 3:53 AM



INSTANCE : An Oracle instance consists of memory structures and Oracle background processes (DBWn, LGWR, CKPT, SMON, PMON .. etc )


SGA :

System Global Area (SGA) is shared memory area ( RAM ). All users of database share information maintained in this.

The SGA's size and function are controlled by initialization (INIT.ORA or SPFILE) parameters.

SGA size is limited by SGA_MAX_SIZE initialization parameter. From 11g, Oracle can manage SGA and PGA completely automatically.

PGA :


The PGA (Program or Process Global Area) is a memory area (RAM) that stores data and control information for a single process. For example, it typically contains a sort area, hash area, session cursor cache

Oracle Background Processes

SMON :

The system monitor process. The usage and function of this Oracle background process is twofold. First, in the event of an instance failure—when the memory structures and processes that comprise the Oracle instance cannot continue to run—the SMON process handles recovery from that instance failure. Second, the SMON process handles disk space management issues on the database by taking smaller fragments of space and "coalescing" them, or piecing them together.


PMON :

The process monitor process. PMON watches the user processes on the database to make sure that they work correctly. If for any reason a user process fails during its connection to Oracle, PMON will clean up the remnants of its activities and make sure that any changes it may have made to the system are "rolled back," or backed out of the database and reverted to their original form.

DBWR :

The database writer process. This background process handles all data block writes to disk. It works in conjunction with the Oracle database buffer cache memory structure. It prevents users from ever accessing a disk to perform a data change such as update, insert, or delete.

LGWR :

The log writer process. This background process handles the writing of redo log entries from the redo log buffer to online redo log files on disk. This process also writes the log sequence number of the current online redo log to the datafile headers and to the control file. Finally, LGWR handles initiating the process of clearing the dirty buffer write queue. At various times, depending on database configuration, those updated blocks are written to disk by DBWR. These events are called checkpoints. LGWR handles telling DBWR to write the changes.

RECO (optional) :

The recoverer process. In Oracle databases using the distributed option, this background process handles the resolution of distributed transactions against the database.

ARCH (optional) :

The archiver process. In Oracle databases that archive their online redo logs, the ARCH process handles automatically moving a copy of the online redo log to a log archive destination.

CKPT (optional) :

 The checkpoint process. In high-activity databases, CKPT can be used to handle writing log sequence numbers to the datafile headers and control file, alleviating LGWR of that responsibility.

ORACLE DATABASE STRUCTURE :

Control file

A control file is a small binary file that is part of an Oracle database. The control file is used to keep track of the database's status and physical structure.

Every Oracle Database must have at least one control file. However, it is recommended to create more than one, up to a maximum of 8.

Redo log

A redo log is a file that is part of an Oracle database. When a transaction is committed, the transaction's details in the redo log buffer is written to a redo log file.

Data file

A data file is a file that is part of an Oracle database. Datafiles are used to store data - including user data and undo data. Data files are grouped together into tablespaces.

1 comments:

Mohammad Noman said...

thank you so much for such a helpful content.

Post a Comment