{"id":3682,"date":"2025-05-29T12:36:17","date_gmt":"2025-05-29T12:36:17","guid":{"rendered":"https:\/\/w3buddy.com\/?post_type=cposts&#038;p=3682"},"modified":"2025-05-29T12:36:18","modified_gmt":"2025-05-29T12:36:18","slug":"background-processes","status":"publish","type":"cposts","link":"https:\/\/w3buddy.com\/blog\/notes\/getting-started-with-oracle-dba\/background-processes\/","title":{"rendered":"Background Processes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\ud83e\udde0 <strong>Introduction<\/strong><br>Oracle Database doesn&#8217;t run on magic \u2014 it runs on <strong>background processes<\/strong>!<br>These are small helper programs that quietly keep your database alive, healthy, and optimized \u2014 doing everything from writing data to disk, to cleaning up after failed sessions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They are <strong>automatically started<\/strong> when the <strong>instance starts<\/strong>, and vary depending on the features your database uses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde9 <strong>Why Are Background Processes Important?<\/strong><br>Think of your Oracle instance like a restaurant:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The database is the kitchen<\/li>\n\n\n\n<li>The <strong>SGA<\/strong> is the prep table<\/li>\n\n\n\n<li>The <strong>background processes<\/strong> are the chefs, cleaners, and waiters making it all run smoothly behind the scenes<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">No background processes = no functioning database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde0 <strong>Types of Background Processes<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd34 <strong>1. Mandatory Background Processes (Always Running)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These are <strong>core processes<\/strong> \u2014 always present in standard configurations (except read-only databases, where some may be inactive):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PMON<\/strong> (<em>Process Monitor<\/em>):<br>Cleans up after failed user processes, releases memory, and re-registers services with the listener.<\/li>\n\n\n\n<li><strong>PMAN<\/strong> (<em>Process Manager<\/em>):<br>Manages shared server processes when using <strong>shared server architecture<\/strong>.<\/li>\n\n\n\n<li><strong>LREG<\/strong> (<em>Listener Registration<\/em>):<br>Registers the database instance with the <strong>Oracle Net Listener<\/strong>.<\/li>\n\n\n\n<li><strong>SMON<\/strong> (<em>System Monitor<\/em>):<br>Performs <strong>instance recovery<\/strong> after crashes and cleans up <strong>temporary segments<\/strong>.<\/li>\n\n\n\n<li><strong>DBWn<\/strong> (<em>Database Writer<\/em>):<br>Writes <strong>dirty buffers<\/strong> from memory (SGA) to disk. Can spawn multiple writers (e.g., DBW0, DBW1\u2026).<\/li>\n\n\n\n<li><strong>CKPT<\/strong> (<em>Checkpoint<\/em>):<br>Updates <strong>datafile headers<\/strong> and <strong>control files<\/strong> with checkpoint info (ensuring recoverability).<\/li>\n\n\n\n<li><strong>LGWR<\/strong> (<em>Log Writer<\/em>):<br>Writes <strong>redo log entries<\/strong> from memory to <strong>online redo log files<\/strong>. Critical for recovery.<\/li>\n\n\n\n<li><strong>MMON<\/strong> (<em>Manageability Monitor<\/em>):<br>Gathers <strong>AWR<\/strong> (Automatic Workload Repository) stats for performance tuning.<\/li>\n\n\n\n<li><strong>MMNL<\/strong> (<em>Manageability Monitor Lite<\/em>):<br>Assists MMON by <strong>writing AWR snapshots<\/strong> to disk.<\/li>\n\n\n\n<li><strong>RECO<\/strong> (<em>Recoverer<\/em>):<br>Resolves <strong>distributed transactions<\/strong> that fail in multi-database setups.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udfe1 <strong>2. Optional Background Processes (Feature-Specific)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These start <strong>only if<\/strong> the corresponding feature is enabled:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ARCn<\/strong> (<em>Archiver<\/em>):<br>Copies <strong>redo logs to archive<\/strong> storage when the database is in <strong>ARCHIVELOG mode<\/strong>.<\/li>\n\n\n\n<li><strong>CJQ0<\/strong> (<em>Job Queue Coordinator<\/em>):<br>Manages <strong>scheduled jobs<\/strong> (DBMS_SCHEDULER or older job queues).<\/li>\n\n\n\n<li><strong>RVWR<\/strong> (<em>Recovery Writer<\/em>):<br>Writes <strong>Flashback Database<\/strong> logs to enable database rewind.<\/li>\n\n\n\n<li><strong>FBDA<\/strong> (<em>Flashback Data Archive<\/em>):<br>Tracks historical data changes for <strong>Flashback Query<\/strong> (Oracle Total Recall).<\/li>\n\n\n\n<li><strong>SMCO<\/strong> (<em>Space Management Coordinator<\/em>):<br>Automates space management, including <strong>segment shrinking<\/strong> and cleanup.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udfe2 <strong>3. Worker Processes (Task Executors)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">These are <strong>helper processes<\/strong> launched to serve others:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Dnnn<\/strong> (<em>Dispatcher<\/em>):<br>Accepts client connection requests in <strong>shared server<\/strong> mode.<\/li>\n\n\n\n<li><strong>Snnn<\/strong> (<em>Shared Server<\/em>):<br>Handles actual client requests (SQL execution, fetch, etc.) in <strong>shared server<\/strong> setups.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\uddea <strong>Fun Fact:<\/strong><br>Some Oracle systems may have <strong>over 100 background processes<\/strong>, especially when using <strong>RAC<\/strong>, <strong>Data Guard<\/strong>, <strong>In-Memory<\/strong>, or <strong>Multitenant<\/strong> features.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To view all running background processes:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>Query 1: Show Active Background Processes<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>COLUMN program FORMAT A20\nSELECT program \nFROM v$process \nWHERE background = 1;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>Query 2: Show Background Processes with Session Info<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>COLUMN pid FORMAT 999\nCOLUMN program FORMAT A20\nCOLUMN sid FORMAT 999\nCOLUMN serial# FORMAT 99999\n\nSELECT p.pid, p.program, s.sid, s.serial#\nFROM v$process p\nJOIN v$session s ON p.addr = s.paddr\nWHERE p.background = 1;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udee0\ufe0f <strong>DBA Tip of the Day<\/strong><br>If your database seems &#8220;slow&#8221; or &#8220;hung,&#8221; don\u2019t just guess \u2014 check the logs for <strong>PMON<\/strong>, <strong>LGWR<\/strong>, or <strong>SMON<\/strong> activity.<br>These are often early indicators of <strong>resource contention<\/strong> or <strong>crashes<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, monitoring <code>V$PROCESS<\/code>, <code>V$SESSION<\/code>, and <code>V$SYSTEM_EVENT<\/code> can reveal which background processes are doing the heavy lifting \u2014 or getting stuck.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83e\udde0 IntroductionOracle Database doesn&#8217;t run on magic \u2014 it runs on background processes!These are small helper programs that quietly keep your database alive, healthy, and optimized \u2014 doing everything from writing data to disk, to cleaning up after failed sessions. They are automatically started when the instance starts, and vary depending on the features your [&hellip;]<\/p>\n","protected":false},"template":"","meta":{"googlesitekit_rrm_CAowu461DA:productID":""},"categories":[960,952],"class_list":["post-3682","cposts","type-cposts","status-publish","hentry","category-getting-started-with-oracle-dba","category-notes"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts\/3682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/cposts"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=3682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=3682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}