DBA Hub

📋Steps in this guide1/16

Oracle Background Processes

Learn Oracle background processes in detail including DBWn, LGWR, CKPT, SMON, PMON, ARCn & more. A complete guide for Oracle DBAs and interviews.

oracle configurationintermediate
by OracleDba
17 views
1

What Are Oracle Background Processes?

Oracle background processes are system processes that perform maintenance tasks for the database instance. They work together with server processes to ensure: - Data consistency - High performance - Crash recovery - Efficient resource utilization An Oracle instance consists of: - SGA (System Global Area) - Background Processes Without background processes, Oracle would not be able to manage memory, write data to disk, or recover from failures.
2

Mandatory Oracle Background Processes

Some background processes are mandatory , meaning the database cannot function without them.
3

1. DBWn (Database Writer)

Role: Writes modified blocks (dirty buffers) from the database buffer cache to data files on disk. Key Responsibilities: - Ensures data in memory is eventually written to disk - Reduces I/O during checkpoints - Improves performance by batching writes When DBWn Writes Data: - During checkpoints - When buffer cache is full - When there are too many dirty buffers - On timeout DBWn does not write on every commit. Commit only confirms redo is written.
4

2. LGWR (Log Writer)

Role: Writes redo entries from the redo log buffer to the online redo log files. Key Responsibilities: - Guarantees transaction durability - Plays a critical role during COMMIT LGWR Writes When: - A COMMIT is issued - Redo log buffer is one-third full - Every 3 seconds - Before DBWn writes dirty buffers If LGWR fails, the database instance will terminate.
5

3. CKPT (Checkpoint Process)

Role: Signals DBWn and updates control files and data file headers with checkpoint information. Key Responsibilities: - Maintains synchronization between data files and redo logs - Reduces recovery time during instance recovery Important Note: - CKPT does not write data blocks - DBWn performs the actual writing
6

4. SMON (System Monitor)

Role: Performs instance recovery and space cleanup. Key Responsibilities: - Recovers database after instance failure - Cleans up temporary segments - Coalesces free space in dictionary-managed tablespaces SMON automatically starts instance recovery when the database is opened.
7

5. PMON (Process Monitor)

Role: Cleans up failed user processes. Key Responsibilities: - Releases locks held by failed sessions - Frees PGA memory - Registers the database with the listener (dynamic registration)
8

Optional and Specialized Background Processes

Oracle also runs several optional background processes depending on database features and configuration.
9

6. ARCn (Archiver)

Role: Copies online redo logs to archive log destinations. Used In: - ARCHIVELOG mode - Data Guard environments ARCn is critical for backup and recovery strategies.
10

7. MMON & MMAN

MMON (Manageability Monitor): - Collects performance statistics - Generates AWR snapshots MMAN (Memory Manager): - Manages Automatic Memory Management (AMM)
11

8. RECO (Recoverer Process)

Role: Resolves in-doubt distributed transactions. Used In: - Distributed databases - Two-phase commit environments
12

9. CJQ0 (Job Queue Coordinator)

Role: Manages and executes scheduled jobs. Used For: - DBMS_SCHEDULER jobs - Automated maintenance tasks
13

10. RVWR (Recovery Writer)

Role: Writes flashback logs. Used In: - Flashback Database feature
14

How to View Background Processes

You can view background processes using: Or at OS level:

Code/Command (click line numbers to comment):

1
2
3
4
5
SELECT pname, description
FROM v$bgprocess
ORDER BY pname;

ps -ef | grep ora_
15

Why Background Processes Matter for DBAs

Understanding background processes helps DBAs: - Diagnose performance issues - Analyze AWR reports - Troubleshoot hangs and waits - Handle crash and instance recovery - Answer interview questions confidently
16

Common Interview Questions

- Difference between LGWR and DBWn? - Does commit write data blocks to disk? - What happens if LGWR fails? - Who performs instance recovery? - Role of CKPT in checkpoints?

Comments (0)

Please to add comments

No comments yet. Be the first to comment!