Mandatory Background Process in Oracle Database

 The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.

Summary: in this tutorial, you will learn What is Background processes in the oracle database,

10g introduced processes such as: 

MMAN (Memory Manager, an SGA background process), 

RVWR(Recovery Writer used by Flashback technology), 

MMNL(Memory Monitor Light that works with the AWR) and many more. (check out New Background Processes In 10g (Doc ID 268197.1))


11g introduced processes such as: 

DIAG (diagnosability process), 

FBDA (flashback data archiver process), 

SMCO (space management coordinator) and many more (check out New Background Processes In 11g (Doc ID 444149.1))


12c introduced processes such as: 

OFSD (Oracle File Server Background Process),

SAnn (SGA Allocator) , 

LGnn (Log Writer Worker) and many more (check out New Background Processes In 12c (Doc ID 1625912.1)) 


The job coordinator process (CJQ0) is automatically started and stopped as needed by Oracle Scheduler (see "Oracle Scheduler"). The coordinator process periodically selects jobs that need to be run from the system JOB$ table. New jobs selected are ordered by time.

The coordinator process dynamically spawns job queue slave processes (Jnnn) to run the jobs.

The following Background Processes are mandatory  in Oracle Database:

1)DBWR

2)LGWR

3)CKPT

4)SMON

5)PMON

6)RECO

Note: if Above any of the Background Processes are Killed the instance will be aborted.


Name: DBWR

Expanded Name: Database Writer Process

Short Description: Writes modified blocks from the database buffer cache to the data files

Long Description: The primary responsibility of the Database Writer Process is to write data blocks to disk. It also handles checkpoints, files open synchronization, and logging of Block Written records. In many cases, the blocks that the Database Writer Process writes are scattered throughout the disk. Thus, the writes tend to be slower than the sequential writes performed by LGWR. The Database Writer Process performs multiblock writes when possible to improve efficiency. The number of blocks written in a multi-block write varies by the operating system. The DB_WRITER_PROCESSES initialization parameter specifies the number of Database Writer Processes. There can be 1 to 100 Database Writer Processes. The names of the first 36 Database Writer Processes are DBW0-DBW9 and DBWa-DBWz. The names of the 37th through 100th Database Writer Processes are BW36-BW99. The database selects an appropriate default setting for the DB_WRITER_PROCESSES parameter or adjusts a user-specified setting based on the number of CPUs and processor groups.

External Properties: Database instances


Name:: LGWR

Expanded Name: Log Writer Process

Short Description: Writes redo entries to the online redo log

Long Description: Redo log entries are generated in the redo log buffer of the system global area (SGA). LGWR writes the redo log entries sequentially into a redo log file. If the database has a multiplexed redo log, then LGWR writes the redo log entries to a group of redo log files

External Properties: Database instances, Oracle ASM instances


Name:: CKPT

Expanded Name:: Checkpoint

Short Description:: Signals DBWn at checkpoints and updates all the data files and control files of the database to indicate the most recent checkpoint.

Long Description:: At specific times CKPT starts a checkpoint request by messaging DBWn to begin writing dirty buffers. On completion of individual checkpoint requests, CKPT updates data file headers and control files to record the most recent checkpoint.

CKPT checks every three seconds to see whether the amount of memory exceeds the value of the PGA_AGGREGATE_LIMIT initialization parameter, and if so, takes the action described in PGA_AGGREGATE_LIMIT

External Properties: Oracle ASM instances


Name: SMON

Expanded Name: System Monitor Process

Short Description: Performs critical tasks such as instance recovery and dead transaction recovery, and maintenance tasks such as temporary space reclamation, data dictionary cleanup, and undo tablespace management

Long Description: SMON performs many database maintenance tasks, including the following:

Creates and manages the temporary tablespace metadata

Reclaims space used by orphaned temporary segments

Maintains the undo tablespace by onlining, offlining, and shrinking the undo segments based on undo space usage statistics

Cleans up the data dictionary when it is in a transient and inconsistent state

Maintains the SCN to time mapping table used to support Oracle Flashback features

In an Oracle RAC database, the SMON process of one instance can perform instance recovery for other instances that have failed.

SMON is resilient to internal and external errors raised during background activities.

External Properties: Database instances


Name: PMON

Expanded Name: Process Monitor

Short Description: Scans for dead processes and coordinates cleanup

Long Description: PMON periodically scans all processes to find any that have died abnormally.  PMON is then responsible for coordinating the cleanup performed by the CLMN process and the CLnn slaves.

External Properties: Database instances, Oracle ASM instances, Oracle ASM Proxy instances



Name: RECO

Expanded Name:  Recover Process

Short Description: Resolves distributed transactions that are pending because of a network or system failure in a distributed database

Long Description: RECO uses the information in the pending transaction table to finalize the status of in-doubt transactions. At timed intervals, the local RECO attempts to connect to remote databases and automatically complete the commit or rollback of the local portion of any pending distributed transactions. All transactions automatically resolved by RECO are removed from the pending transaction table.

                                                                        Thanks for your time!!


1 Comments

DELETE Statement in ORACLE DB— Step by Step Internal Flow with classroom example.

Imagine your Oracle database like a school, and you’re Teacher decides to remove a student (row) from the classroom(table). Let’s see how the journey works step by step: 1)Classroom = Oracle Table 2)Students = Rows (Records) 3)Class Teacher = Oracle Server Process 4)Attendance Register = Data Dictionary User fires DELETE statement: DELETE FROM students WHERE grade = 'D'; Internal Processing Steps: Client Process Sends DELETE Statement to Server Process The teacher receives a request to remove a student from the classroom. Syntax Check (Parsing) The teacher checks if the request is grammatically correct — proper command, keywords, and a semicolon. Semantic Check Teacher verifies if the classroom exists and whether the condition (like grade = 'D') makes sense. Object Resolution Teacher confirms that the ‘students’ classroom (table) exists in the school records (data dictionary). Optimization Decides the fastest way to find those students — by roll number, grade, or al...