{"id":5821,"date":"2026-07-26T14:50:07","date_gmt":"2026-07-26T09:20:07","guid":{"rendered":"https:\/\/w3buddy.com\/?p=5821"},"modified":"2026-07-26T14:50:10","modified_gmt":"2026-07-26T09:20:10","slug":"oracle-database-architecture","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/oracle-database-architecture\/","title":{"rendered":"Oracle Database Architecture"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A complete production-ready SOP covering Oracle Database architecture from the ground up. Covers physical and logical storage structures, Oracle instance components, SGA and its sub-components, PGA, background processes, connection models, memory management, redo and undo internals, and how everything works together \u2014 with real commands, diagnostic queries, and consultant-level notes that connect architecture to real-world DBA activities.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. Document Info<\/h3>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Item<\/th><th>Detail<\/th><\/tr><\/thead><tbody><tr><td>Oracle Version<\/td><td>19c (19.3+)<\/td><\/tr><tr><td>OS<\/td><td>Oracle Linux 7.x \/ RHEL 7.x or 8.x<\/td><\/tr><tr><td>Purpose<\/td><td>Foundation knowledge for all DBA activities<\/td><\/tr><tr><td>MOS Reference<\/td><td>Doc ID 1523319.1 (Oracle Architecture Overview)<\/td><\/tr><tr><td>MOS Reference<\/td><td>Doc ID 430473.1 (SGA and Memory Management)<\/td><\/tr><tr><td>MOS Reference<\/td><td>Doc ID 1549180.1 (Background Processes Reference)<\/td><\/tr><tr><td>Prepared By<\/td><td>W3Buddy<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. The Big Picture \u2014 What is an Oracle Database?<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Most people confuse Oracle Instance with Oracle Database. These are two completely separate things and understanding the difference is the most fundamental concept in Oracle architecture.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Oracle Instance vs Oracle Database<\/h4>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th><\/th><th>Oracle Instance<\/th><th>Oracle Database<\/th><\/tr><\/thead><tbody><tr><td>What it is<\/td><td>Memory structures + Background processes running in RAM<\/td><td>Physical files stored on disk<\/td><\/tr><tr><td>Lives in<\/td><td>Server RAM<\/td><td>Server disk \/ storage<\/td><\/tr><tr><td>Can exist without the other?<\/td><td>Yes \u2014 instance can run without a mounted database<\/td><td>Yes \u2014 database files can exist without a running instance<\/td><\/tr><tr><td>Multiple instances per DB?<\/td><td>Yes \u2014 RAC has one database with multiple instances<\/td><td>One database accessed by multiple instances in RAC<\/td><\/tr><tr><td>When you start the DB<\/td><td>You start the INSTANCE which then opens the DATABASE<\/td><td>\u2014<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>ONE DATABASE, ONE INSTANCE (Standalone)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nSERVER RAM                    SERVER DISK\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510           \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502  ORACLE         \u2502           \u2502  ORACLE DATABASE      \u2502\n\u2502  INSTANCE       \u2502\u25c4\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25ba\u2502                       \u2502\n\u2502                 \u2502  mounts   \u2502  \u25cf Datafiles          \u2502\n\u2502  \u25cf SGA          \u2502  and      \u2502  \u25cf Control Files      \u2502\n\u2502  \u25cf Background   \u2502  opens    \u2502  \u25cf Redo Log Files     \u2502\n\u2502    Processes    \u2502           \u2502  \u25cf Archive Log Files  \u2502\n\u2502  \u25cf PGA          \u2502           \u2502  \u25cf Parameter File     \u2502\n\u2502                 \u2502           \u2502  \u25cf Password File      \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518           \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nONE DATABASE, MULTIPLE INSTANCES (RAC)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nNODE 1 RAM          NODE 2 RAM          SHARED DISK\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510       \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 INSTANCE 1\u2502       \u2502 INSTANCE 2\u2502       \u2502 ONE DATABASE  \u2502\n\u2502 (RACDB1)  \u2502\u25c4\u2500\u2500\u2500\u2500\u2500\u25ba\u2502 (RACDB2)  \u2502\u25c4\u2500\u2500\u2500\u2500\u2500\u25ba\u2502               \u2502\n\u2502 SGA + BGP \u2502       \u2502 SGA + BGP \u2502       \u2502 \u25cf Datafiles   \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518       \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518       \u2502 \u25cf Controlfile \u2502\n                                        \u2502 \u25cf Redo Logs   \u2502\n                                        \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Check Instance vs Database<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sqlplus \/ as sysdba\n\nset linesize 200\nset pagesize 50\n\n-- Shows INSTANCE information (what is in memory)\ncol instance_name  for a15\ncol host_name      for a25\ncol version        for a15\ncol status         for a12\ncol startup_time   for a25\n\nSELECT instance_name,\n       host_name,\n       version_full,\n       status,\n       TO_CHAR(startup_time,'YYYY-MM-DD HH24:MI:SS') startup_time\nFROM   v$instance;\n\n-- Shows DATABASE information (what is on disk)\ncol name           for a12\ncol db_unique_name for a20\ncol open_mode      for a15\ncol log_mode       for a15\ncol database_role  for a20\n\nSELECT name,\n       db_unique_name,\n       open_mode,\n       log_mode,\n       database_role,\n       created\nFROM   v$database;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. Physical Database Structures (Files on Disk)<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Physical structures are the actual files Oracle creates and manages on disk. Without these files \u2014 there is no database.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 \u2014 Datafiles<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What are datafiles?<\/strong> Datafiles are the actual files that store all the data \u2014 tables, indexes, PL\/SQL code, views, sequences, everything. Each tablespace is made up of one or more datafiles.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why does this matter for DBA work?<\/strong> When a datafile runs out of space, tables cannot grow and inserts fail with <code>ORA-01653<\/code>. When a datafile is accidentally deleted, that tablespace goes offline and applications fail. Every space management task, every backup, and every recovery starts with knowing your datafiles.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- List all datafiles with sizes and status\nset linesize 200\nset pagesize 100\ncol file#           for 999\ncol tablespace_name for a25\ncol status          for a12\ncol autoextensible  for a5\ncol size_mb         for 99999999\ncol maxsize_mb      for 99999999\ncol name            for a70\n\nSELECT f.file#,\n       t.name                          tablespace_name,\n       f.status,\n       ROUND(f.bytes\/1024\/1024,2)      size_mb,\n       f.autoextensible,\n       ROUND(f.maxbytes\/1024\/1024,2)   maxsize_mb,\n       f.name\nFROM   v$datafile  f,\n       v$tablespace t\nWHERE  f.ts# = t.ts#\nORDER BY t.name, f.file#;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 \u2014 Control Files<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the control file?<\/strong> The control file is the most critical file in an Oracle database. It contains:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Database name and DBID<\/li>\n\n\n\n<li>Timestamp of database creation<\/li>\n\n\n\n<li>List of all datafiles and their locations<\/li>\n\n\n\n<li>List of all redo log files and their locations<\/li>\n\n\n\n<li>Current redo log sequence number<\/li>\n\n\n\n<li>Checkpoint information<\/li>\n\n\n\n<li>RMAN backup information (when no catalog is used)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle reads the control file at database startup to find all other files. <strong>If all copies of the control file are lost and there is no backup \u2014 the database cannot be opened.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why multiple control files?<\/strong> Oracle strongly recommends multiplexing (having multiple copies of) the control file on different disks. If one disk fails, the other copies protect you. Always have at least 2, preferably 3 control files on different storage locations.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- List all control files\nset linesize 200\nset pagesize 50\ncol status for a10\ncol name   for a80\n\nSELECT status, name\nFROM   v$controlfile\nORDER BY name;\n\n-- Check control file record section sizes\nset linesize 200\nset pagesize 100\ncol type           for a30\ncol records_total  for 9999999\ncol records_used   for 9999999\n\nSELECT type, records_total, records_used\nFROM   v$controlfile_record_section\nORDER BY type;\n\n-- How many control file copies are configured\nSHOW PARAMETER control_files;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3.3 \u2014 Online Redo Log Files<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What are online redo logs?<\/strong> Redo logs record every change made to the database \u2014 every INSERT, UPDATE, DELETE, and DDL operation is written to the redo log BEFORE it is written to the datafile. This is the cornerstone of Oracle&#8217;s crash recovery mechanism.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why do redo logs matter for DBA work?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Too small = frequent log switches = performance impact on commits (<code>log file sync<\/code> wait event)<\/li>\n\n\n\n<li>Too few groups = archiver cannot keep up = database hangs (<code>log switch\/archiving needed<\/code> wait)<\/li>\n\n\n\n<li>If current redo log is corrupted = database cannot open without incomplete recovery<\/li>\n\n\n\n<li>Redo logs are the foundation of Data Guard \u2014 the standby applies these logs<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How does Oracle use redo logs?<\/strong> Oracle writes to redo log groups in circular fashion. It writes to Group 1, fills it, switches to Group 2, fills it, switches to Group 3, then back to Group 1. Before reusing a group, it must be archived (in ARCHIVELOG mode). The LGWR background process writes redo.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check online redo log groups and members\nset linesize 200\nset pagesize 100\ncol l#      for 999\ncol status  for a12\ncol members for 999\ncol member  for a70\n\nSELECT l.group#  l#,\n       l.members,\n       l.bytes\/1024\/1024  size_mb,\n       l.status,\n       l.archived,\n       l.sequence#,\n       f.member\nFROM   v$log     l,\n       v$logfile f\nWHERE  l.group# = f.group#\nORDER BY l.group#, f.member;\n\n-- Check which group is currently being written to\nSELECT group#, status FROM v$log WHERE status = 'CURRENT';<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3.4 \u2014 Archive Log Files<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What are archive logs?<\/strong> When Oracle finishes writing to a redo log group and switches to the next group, it copies the completed redo log to the archive log destination. This copy is called an archivelog. Archive logs allow recovery to any point in time \u2014 you restore the datafiles from backup and then apply all the archive logs created after that backup.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Archive logs are the bridge between backups.<\/strong> Without archive logs you can only recover to the last backup point. With archive logs you can recover to any point between backups \u2014 even to one second before a disaster.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check archive log mode and destination\nARCHIVE LOG LIST;\n\n-- List recent archive logs\nset linesize 200\nset pagesize 100\ncol name           for a70\ncol sequence#      for 9999999\ncol first_time     for a25\ncol completion_time for a25\ncol archived       for a10\n\nSELECT sequence#,\n       name,\n       TO_CHAR(first_time,'YYYY-MM-DD HH24:MI:SS')      first_time,\n       TO_CHAR(completion_time,'YYYY-MM-DD HH24:MI:SS')  completion_time,\n       blocks * block_size \/ 1024 \/ 1024                 size_mb\nFROM   v$archived_log\nWHERE  completion_time &gt; SYSDATE - 1\nORDER BY sequence# DESC\nFETCH FIRST 20 ROWS ONLY;\n\n-- Check archive destination status\nset linesize 200\nset pagesize 50\ncol dest_name  for a25\ncol status     for a12\ncol target     for a12\ncol destination for a50\n\nSELECT dest_id, dest_name, status, target, destination\nFROM   v$archive_dest\nWHERE  status != 'INACTIVE'\nORDER BY dest_id;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3.5 \u2014 Parameter File (spfile \/ pfile)<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the parameter file?<\/strong> The parameter file contains initialization parameters that control how Oracle starts and behaves \u2014 memory sizes, number of processes, file locations, feature settings. Oracle reads it at instance startup.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>spfile vs pfile:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>spfile<\/code> (Server Parameter File) \u2014 binary file managed by Oracle. Changes made with <code>ALTER SYSTEM<\/code> are written directly to spfile. This is the production standard.<\/li>\n\n\n\n<li><code>pfile<\/code> (init.ora) \u2014 plain text file. Must be manually edited. Oracle cannot update it automatically. Used for emergencies and special startup scenarios.<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check if using spfile or pfile\nSELECT decode(value,NULL,'PFILE','SPFILE') parameter_file_type,\n       value                               spfile_location\nFROM   v$parameter\nWHERE  name = 'spfile';\n\n-- Show spfile location\nSHOW PARAMETER spfile;\n\n-- List all non-default parameters (what you have customized)\nset linesize 200\nset pagesize 100\ncol name        for a45\ncol value       for a50\ncol description for a60\n\nSELECT name, value, description\nFROM   v$parameter\nWHERE  isdefault = 'FALSE'\nORDER BY name;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># View pfile\/spfile content (as oracle OS user)\n# spfile is binary -- cannot cat it\n# Create a pfile from spfile to read it\nsqlplus \/ as sysdba<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Create a readable pfile from spfile\nCREATE PFILE='\/tmp\/init_ORCL_readable.ora' FROM SPFILE;\nEXIT;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/tmp\/init_ORCL_readable.ora<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">3.6 \u2014 Password File<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the password file?<\/strong> The password file stores the encrypted password for the SYS user (and other users granted SYSDBA\/SYSOPER privileges). It allows remote SYSDBA connections \u2014 for example <code>sqlplus sys\/password@ORCL as sysdba<\/code> over the network. Without the password file, SYSDBA login only works locally via OS authentication.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why does this matter for DBA work?<\/strong> Data Guard requires password files because the standby must authenticate with the primary over the network as SYS. RMAN duplicate requires it. OEM agent uses it. If the password file is missing or mismatched, these features break.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code># Check password file location (Convention A)\nls -lh $ORACLE_HOME\/dbs\/orapw${ORACLE_SID}\n\n# Convention B\nls -lh $ORACLE_HOME\/dbs\/orapwORCL\n\n# List users who have SYSDBA or SYSOPER privilege\n# (these users are in the password file)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>set linesize 150\nset pagesize 50\ncol username  for a25\ncol sysdba    for a8\ncol sysoper   for a8\ncol sysbackup for a10\ncol sysdg     for a8\n\nSELECT username, sysdba, sysoper, sysbackup, sysdg\nFROM   v$pwfile_users\nORDER BY username;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. Logical Database Structures<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Logical structures are how Oracle organizes data internally \u2014 they are not individual files on disk but rather Oracle&#8217;s way of grouping and managing storage.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">4.1 \u2014 The Logical Storage Hierarchy<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>DATABASE\n    \u2502\n    \u251c\u2500\u2500 TABLESPACE (logical grouping)\n    \u2502       \u2502\n    \u2502       \u251c\u2500\u2500 SEGMENT (one object = one or more segments)\n    \u2502       \u2502       \u2502\n    \u2502       \u2502       \u251c\u2500\u2500 EXTENT (contiguous set of blocks)\n    \u2502       \u2502       \u2502       \u2502\n    \u2502       \u2502       \u2502       \u2514\u2500\u2500 ORACLE BLOCK (smallest unit \u2014 8KB default)\n    \u2502       \u2502       \u2502\n    \u2502       \u2502       \u2514\u2500\u2500 EXTENT\n    \u2502       \u2502\n    \u2502       \u2514\u2500\u2500 SEGMENT\n    \u2502\n    \u2514\u2500\u2500 TABLESPACE\n            \u2502\n            \u2514\u2500\u2500 maps to physical DATAFILE(s) on disk<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Key relationships:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1 Database \u2192 Many Tablespaces<\/li>\n\n\n\n<li>1 Tablespace \u2192 Many Datafiles + Many Segments<\/li>\n\n\n\n<li>1 Segment \u2192 Many Extents (segments grow by adding extents)<\/li>\n\n\n\n<li>1 Extent \u2192 Many Oracle Blocks (contiguous)<\/li>\n\n\n\n<li>Oracle Block \u2192 smallest I\/O unit (default 8KB)<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">4.2 \u2014 Tablespaces<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is a tablespace?<\/strong> A tablespace is a logical storage container. It maps to one or more physical datafiles on disk. Every database object (table, index, etc.) belongs to exactly one tablespace.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Default tablespaces in a fresh Oracle 19c database:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Tablespace<\/th><th>Purpose<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>SYSTEM<\/td><td>Oracle data dictionary \u2014 tables, views, packages owned by SYS<\/td><td>Never store application data here<\/td><\/tr><tr><td>SYSAUX<\/td><td>Auxiliary to SYSTEM \u2014 AWR, Statspack, OEM repository<\/td><td>Never store application data here<\/td><\/tr><tr><td>USERS<\/td><td>Default tablespace for user objects<\/td><td>General purpose<\/td><\/tr><tr><td>UNDOTBS1<\/td><td>Undo segments \u2014 stores before-images for rollback and read consistency<\/td><td>Managed automatically<\/td><\/tr><tr><td>TEMP<\/td><td>Temporary segments for sort operations, hash joins<\/td><td>Shared across sessions<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Complete tablespace overview\nset linesize 200\nset pagesize 100\ncol tablespace_name for a25\ncol contents        for a12\ncol status          for a10\ncol total_mb        for 9999999\ncol free_mb         for 9999999\ncol used_pct        for 999.99\ncol autoextend      for a5\n\nSELECT df.tablespace_name,\n       t.contents,\n       t.status,\n       ROUND(df.total_bytes\/1024\/1024,2)                    total_mb,\n       ROUND(NVL(fs.free_bytes,0)\/1024\/1024,2)              free_mb,\n       ROUND((1-NVL(fs.free_bytes,0)\/df.total_bytes)*100,2) used_pct,\n       df.autoextend\nFROM  (SELECT tablespace_name,\n              SUM(bytes)    total_bytes,\n              MAX(DECODE(autoextensible,'YES','YES','NO')) autoextend\n       FROM   dba_data_files\n       GROUP BY tablespace_name) df,\n      (SELECT tablespace_name,\n              SUM(bytes) free_bytes\n       FROM   dba_free_space\n       GROUP BY tablespace_name) fs,\n       dba_tablespaces t\nWHERE  df.tablespace_name = fs.tablespace_name(+)\nAND    df.tablespace_name = t.tablespace_name\nORDER BY used_pct DESC;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">4.3 \u2014 Segments, Extents, and Blocks<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check segment sizes for a specific schema\nset linesize 200\nset pagesize 100\ncol owner        for a20\ncol segment_name for a35\ncol segment_type for a20\ncol tablespace_name for a20\ncol size_mb      for 99999999\n\nSELECT owner,\n       segment_name,\n       segment_type,\n       tablespace_name,\n       ROUND(bytes\/1024\/1024,2) size_mb,\n       extents,\n       blocks\nFROM   dba_segments\nWHERE  owner = 'HR'\nORDER BY bytes DESC\nFETCH FIRST 20 ROWS ONLY;\n\n-- Check block size\nSHOW PARAMETER db_block_size;\n\n-- Check extent management mode\nset linesize 200\nset pagesize 50\ncol tablespace_name   for a25\ncol extent_management for a20\ncol allocation_type   for a15\ncol segment_space_management for a25\n\nSELECT tablespace_name,\n       extent_management,\n       allocation_type,\n       segment_space_management\nFROM   dba_tablespaces\nORDER BY tablespace_name;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. Oracle Instance \u2014 Memory Structures<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>The Oracle Instance consists of memory (SGA + PGA) and background processes. When you start an Oracle instance, Oracle allocates a large chunk of RAM for the SGA and starts multiple background processes.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.1 \u2014 SGA \u2014 System Global Area<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the SGA?<\/strong> The SGA (System Global Area) is a shared memory region allocated when the Oracle instance starts. ALL sessions connected to the instance share the SGA. It is the single largest consumer of RAM on an Oracle database server.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why is SGA critical?<\/strong> The bigger the SGA (specifically the buffer cache), the more data Oracle can keep in memory and the fewer disk reads are needed. Disk reads are 1000x slower than memory reads. Proper SGA sizing is one of the most impactful performance tuning actions.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Overall SGA summary\nset linesize 200\nset pagesize 50\ncol name       for a30\ncol value_mb   for 9999999.99\n\nSELECT name,\n       ROUND(value\/1024\/1024,2) value_mb\nFROM   v$sga\nORDER BY value DESC;\n\n-- Detailed SGA component breakdown\nset linesize 200\nset pagesize 100\ncol component    for a40\ncol current_mb   for 9999999\ncol min_mb       for 9999999\ncol max_mb       for 9999999\n\nSELECT component,\n       ROUND(current_size\/1024\/1024,0)  current_mb,\n       ROUND(min_size\/1024\/1024,0)       min_mb,\n       ROUND(max_size\/1024\/1024,0)       max_mb\nFROM   v$sga_dynamic_components\nWHERE  current_size &gt; 0\nORDER BY current_size DESC;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.2 \u2014 SGA Components in Detail<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SGA (System Global Area)\n\u251c\u2500\u2500 Buffer Cache          \u2190 Cached datafile blocks (largest component)\n\u251c\u2500\u2500 Shared Pool           \u2190 SQL cache, data dictionary cache, PL\/SQL code\n\u2502   \u251c\u2500\u2500 Library Cache     \u2190 Parsed SQL statements, execution plans, PL\/SQL code\n\u2502   \u2514\u2500\u2500 Dictionary Cache  \u2190 Metadata about tables, columns, indexes, users\n\u251c\u2500\u2500 Redo Log Buffer       \u2190 Recent redo entries before LGWR writes to disk\n\u251c\u2500\u2500 Large Pool            \u2190 Used by RMAN, shared server, parallel query\n\u251c\u2500\u2500 Java Pool             \u2190 Java Virtual Machine memory (if Java used)\n\u251c\u2500\u2500 Streams Pool          \u2190 GoldenGate, Advanced Queuing, Streams\n\u2514\u2500\u2500 Fixed SGA             \u2190 Internal Oracle overhead (small, fixed size)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.3 \u2014 Buffer Cache<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the Buffer Cache?<\/strong> The Buffer Cache is a pool of memory that holds copies of Oracle data blocks read from datafiles. When a session needs a block, Oracle first checks the buffer cache (logical read). If found \u2014 great, no disk I\/O needed. If not found (cache miss), Oracle reads the block from disk into the cache (physical read).<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Buffer Cache replacement algorithm:<\/strong> Oracle uses a modified LRU (Least Recently Used) algorithm called the &#8220;touch count&#8221; mechanism. Recently and frequently accessed blocks stay at the hot end of the LRU list. Infrequently accessed blocks migrate to the cold end and are eligible for replacement.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Buffer cache hit ratio\n-- Formula: 1 - (physical reads \/ (consistent gets + db block gets))\n-- Target: &gt; 95%  (higher is better -- means more reads from cache)\nset linesize 150\nset pagesize 50\n\nSELECT ROUND(\n    (1 - (phy.value \/ NULLIF(con.value + cur.value, 0))) * 100, 2\n) buffer_cache_hit_pct\nFROM   v$sysstat phy,\n       v$sysstat con,\n       v$sysstat cur\nWHERE  phy.name = 'physical reads'\nAND    con.name = 'consistent gets'\nAND    cur.name = 'db block gets';\n\n-- Buffer cache size and advisory\nset linesize 200\nset pagesize 100\ncol size_mb            for 9999999\ncol estd_physical_reads for 9999999999\ncol estd_pct_of_base   for 999.99\n\nSELECT size_for_estimate\/1024\/1024                 size_mb,\n       estd_physical_reads,\n       ROUND(estd_physical_read_factor*100,2)       estd_pct_of_base\nFROM   v$db_cache_advice\nWHERE  name       = 'DEFAULT'\nAND    block_size = (SELECT TO_NUMBER(value)\n                     FROM   v$parameter\n                     WHERE  name = 'db_block_size')\nORDER BY size_for_estimate;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.4 \u2014 Shared Pool<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the Shared Pool?<\/strong> The Shared Pool caches parsed SQL statements, execution plans, PL\/SQL compiled code, and data dictionary information. Its purpose is to avoid redundant parsing work.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Library Cache \u2014 SQL caching explained:<\/strong> When a SQL statement is first executed, Oracle parses it (syntax check, semantic check, optimization, plan generation) \u2014 called a Hard Parse. This is expensive. If the SAME statement is executed again, Oracle finds it in the Library Cache and reuses the plan \u2014 called a Soft Parse. Much cheaper.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>The bind variable connection:<\/strong> For the Library Cache to reuse a plan, the SQL text must match EXACTLY. <code>SELECT * FROM emp WHERE id = 100<\/code> and <code>SELECT * FROM emp WHERE id = 101<\/code> are TWO DIFFERENT statements and both need a hard parse. But <code>SELECT * FROM emp WHERE id = :id<\/code> with different bind variable values uses ONE cached plan. This is why bind variables are critical for performance.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Library cache hit ratio\n-- Target: &gt; 99%\nset linesize 150\nset pagesize 50\n\nSELECT namespace,\n       ROUND(gethitratio*100,2)  get_hit_pct,\n       ROUND(pinhitratio*100,2)  pin_hit_pct,\n       reloads,\n       invalidations\nFROM   v$librarycache\nWHERE  namespace IN ('SQL AREA','TABLE\/PROCEDURE','BODY','TRIGGER')\nORDER BY namespace;\n\n-- Dictionary cache hit ratio\n-- Target: &gt; 95%\nset linesize 150\nset pagesize 50\n\nSELECT ROUND(\n    (1 - SUM(getmisses) \/ NULLIF(SUM(gets), 0)) * 100, 2\n) dict_cache_hit_pct\nFROM   v$rowcache;\n\n-- Shared pool free memory\nset linesize 150\nset pagesize 50\n\nSELECT name,\n       ROUND(bytes\/1024\/1024,2) free_mb\nFROM   v$sgastat\nWHERE  pool = 'shared pool'\nAND    name = 'free memory';\n\n-- Hard parse rate (should be low)\nset linesize 150\nset pagesize 50\n\nSELECT s1.value                                         total_parses,\n       s2.value                                         hard_parses,\n       ROUND(s2.value*100\/NULLIF(s1.value,0),2)         hard_parse_pct\nFROM   v$sysstat s1,\n       v$sysstat s2\nWHERE  s1.name = 'parse count (total)'\nAND    s2.name = 'parse count (hard)';<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.5 \u2014 Redo Log Buffer<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the Redo Log Buffer?<\/strong> The Redo Log Buffer is a circular buffer in the SGA where Oracle temporarily stores redo entries before the LGWR background process writes them to the online redo log files on disk. It is small (default 3-15 MB) compared to the buffer cache.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How commits work with the redo log buffer:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Session makes a change (INSERT, UPDATE, DELETE)<\/li>\n\n\n\n<li>Redo entry describing the change is written to Redo Log Buffer<\/li>\n\n\n\n<li>Session issues COMMIT<\/li>\n\n\n\n<li>LGWR immediately flushes all redo for this transaction from buffer to redo log file on disk<\/li>\n\n\n\n<li>COMMIT returns to the session ONLY AFTER LGWR confirms the write<\/li>\n\n\n\n<li>This ensures committed transactions are never lost even if the server crashes<\/li>\n<\/ol>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check redo log buffer size\nSHOW PARAMETER log_buffer;\n\n-- Check redo log buffer efficiency\n-- \"redo log space requests\" should be near 0\n-- If high -- redo log buffer is too small\nset linesize 150\nset pagesize 50\n\nSELECT name, value\nFROM   v$sysstat\nWHERE  name IN (\n    'redo log space requests',\n    'redo buffer allocation retries',\n    'redo writes',\n    'redo size'\n)\nORDER BY name;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.6 \u2014 Large Pool<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is the Large Pool?<\/strong> The Large Pool is optional memory used for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>RMAN backup and restore operations (I\/O server processes)<\/li>\n\n\n\n<li>Shared server architecture (UGA \u2014 User Global Area)<\/li>\n\n\n\n<li>Parallel query operations<\/li>\n\n\n\n<li>Oracle Advanced Queuing<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Without a Large Pool, these operations steal memory from the Shared Pool causing shared pool fragmentation.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check Large Pool size\nSHOW PARAMETER large_pool_size;\n\n-- Check Large Pool usage\nSELECT name, ROUND(bytes\/1024\/1024,2) mb\nFROM   v$sgastat\nWHERE  pool = 'large pool'\nORDER BY bytes DESC;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">5.7 \u2014 SGA Memory Management Modes<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Three memory management modes \u2014 know which one your environment uses:<\/strong><\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Mode<\/th><th>Parameters<\/th><th>How It Works<\/th><\/tr><\/thead><tbody><tr><td>Manual SGA Management<\/td><td>Set each component individually (db_cache_size, shared_pool_size etc.)<\/td><td>DBA manually sizes each component. Most control but most work.<\/td><\/tr><tr><td>Automatic SGA Management (ASMM)<\/td><td>Set SGA_TARGET<\/td><td>Oracle automatically redistributes memory between components based on workload. Recommended for most environments.<\/td><\/tr><tr><td>Automatic Memory Management (AMM)<\/td><td>Set MEMORY_TARGET<\/td><td>Oracle manages BOTH SGA and PGA automatically. Not recommended for large databases \u2014 can cause paging.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check which mode is in use\nset linesize 200\nset pagesize 50\ncol name  for a30\ncol value for a20\n\nSELECT name, value\nFROM   v$parameter\nWHERE  name IN (\n    'memory_target',\n    'memory_max_target',\n    'sga_target',\n    'sga_max_size',\n    'pga_aggregate_target',\n    'db_cache_size',\n    'shared_pool_size'\n)\nORDER BY name;\n\n-- If memory_target &gt; 0 = AMM mode\n-- If sga_target &gt; 0 and memory_target = 0 = ASMM mode\n-- If both = 0 = Manual mode<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. PGA \u2014 Program Global Area<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is PGA?<\/strong> PGA (Program Global Area) is private memory allocated for each individual server process (or each session in shared server mode). Unlike SGA which is shared between all sessions, PGA is private to each session. When the session disconnects, its PGA is freed.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is PGA used for?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sort operations (ORDER BY, GROUP BY, UNION)<\/li>\n\n\n\n<li>Hash join operations<\/li>\n\n\n\n<li>Bitmap merge operations<\/li>\n\n\n\n<li>Session variables and stack space<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If a sort operation does not fit in PGA, Oracle writes to TEMP tablespace on disk \u2014 much slower. Properly sized PGA reduces temp tablespace writes and dramatically improves sort and join performance.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>PGA (per session \u2014 private)\n\u251c\u2500\u2500 Sort Area          \u2190 Memory for sort operations\n\u251c\u2500\u2500 Hash Area          \u2190 Memory for hash join operations\n\u251c\u2500\u2500 Bitmap Merge Area  \u2190 Memory for bitmap index operations\n\u251c\u2500\u2500 Session Variables  \u2190 Bind variables, session state\n\u2514\u2500\u2500 Stack Space        \u2190 Call stack for PL\/SQL<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Overall PGA usage and statistics\nset linesize 200\nset pagesize 100\ncol name   for a45\ncol value  for a25\n\nSELECT name, value\nFROM   v$pgastat\nWHERE  name IN (\n    'aggregate PGA target parameter',\n    'aggregate PGA auto target',\n    'total PGA inuse',\n    'total PGA allocated',\n    'maximum PGA allocated',\n    'total freeable PGA memory',\n    'cache hit percentage',\n    'recompute count (total)'\n)\nORDER BY name;\n\n-- PGA sizing advisory\nset linesize 200\nset pagesize 100\ncol pga_target_mb         for 9999999\ncol estd_pga_cache_hit_pct for 999.99\ncol estd_overalloc_cnt    for 9999999\n\nSELECT pga_target_for_estimate\/1024\/1024     pga_target_mb,\n       ROUND(estd_pga_cache_hit_pct,2)        estd_pga_cache_hit_pct,\n       estd_overalloc_cnt\nFROM   v$pga_target_advice\nORDER BY pga_target_for_estimate;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. Oracle Background Processes<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What are background processes?<\/strong> Background processes are OS-level processes started by Oracle when the instance starts. They run continuously in the background handling specific tasks \u2014 writing data to disk, writing redo logs, cleaning up, archiving etc. You can see them in <code>ps -ef | grep ora_<\/code>.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why must a DBA know background processes?<\/strong> When you see <code>ora_lgwr_ORCL<\/code> in the process list, you know LGWR is running. When you see redo-related performance problems, you know to look at LGWR. When archiving stops, you look at ARCn. When data is not being written to disk, you look at DBWn. Background processes are the engine room of Oracle.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">7.1 \u2014 Mandatory Background Processes<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>These processes MUST be running for the database to operate. If any of these die, the database shuts down.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Process<\/th><th>Full Name<\/th><th>What It Does<\/th><\/tr><\/thead><tbody><tr><td>PMON<\/td><td>Process Monitor<\/td><td>Cleans up after failed user processes \u2014 rolls back their transactions, frees locks, releases resources. Also registers the DB with listeners (dynamic registration).<\/td><\/tr><tr><td>SMON<\/td><td>System Monitor<\/td><td>Instance recovery after a crash \u2014 applies redo from online redo logs. Also coalesces free space in tablespaces and cleans up temporary segments.<\/td><\/tr><tr><td>DBWR (DBWn)<\/td><td>Database Writer<\/td><td>Writes dirty blocks (modified data blocks in buffer cache) to datafiles on disk. Multiple writers possible (DBW0, DBW1&#8230; DBW9, DBWa-DBWj). Triggered by checkpoints and buffer cache shortage.<\/td><\/tr><tr><td>LGWR<\/td><td>Log Writer<\/td><td>Writes redo entries from the Redo Log Buffer to online redo log files. Triggered by COMMIT, every 3 seconds, when buffer is 1\/3 full, before DBWn writes. Critical for commit performance.<\/td><\/tr><tr><td>CKPT<\/td><td>Checkpoint<\/td><td>Updates the control file and datafile headers with checkpoint information. Also signals DBWn to write dirty blocks during checkpoints.<\/td><\/tr><tr><td>MMON<\/td><td>Manageability Monitor<\/td><td>Takes AWR snapshots, runs ADDM analysis, collects statistics for OEM. Runs every 60 minutes by default.<\/td><\/tr><tr><td>MMNL<\/td><td>Manageability Monitor Lite<\/td><td>Flushes ASH (Active Session History) from memory to AWR tables. Runs every 60 seconds.<\/td><\/tr><tr><td>RECO<\/td><td>Recoverer<\/td><td>Resolves distributed transactions that failed due to network problems. Handles two-phase commit recovery.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">7.2 \u2014 Optional Background Processes<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>These run only when specific features are configured.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Process<\/th><th>Feature<\/th><th>What It Does<\/th><\/tr><\/thead><tbody><tr><td>ARCn (ARC0-ARC9)<\/td><td>ARCHIVELOG mode<\/td><td>Copies completed redo log groups to archive log destinations. Multiple ARCn processes run in parallel.<\/td><\/tr><tr><td>MRP0<\/td><td>Data Guard Standby<\/td><td>Managed Recovery Process \u2014 applies archived logs on the physical standby database.<\/td><\/tr><tr><td>LSP0<\/td><td>Data Guard Logical Standby<\/td><td>Log apply for logical standby \u2014 uses LogMiner to extract and apply SQL from redo.<\/td><\/tr><tr><td>LMS<\/td><td>RAC Cache Fusion<\/td><td>Global Cache Service \u2014 transfers blocks between RAC instances using the interconnect. Critical for RAC performance.<\/td><\/tr><tr><td>LMD<\/td><td>RAC Lock Manager<\/td><td>Manages global enqueue locks across RAC instances.<\/td><\/tr><tr><td>LMON<\/td><td>RAC Cluster Monitor<\/td><td>Manages reconfiguration when nodes join or leave the cluster.<\/td><\/tr><tr><td>Dnnn<\/td><td>Shared Server<\/td><td>Dispatcher processes for shared server architecture.<\/td><\/tr><tr><td>Snnn<\/td><td>Shared Server<\/td><td>Shared server processes that handle multiple client connections.<\/td><\/tr><tr><td>CJQ0<\/td><td>DBMS_JOB \/ Scheduler<\/td><td>Job Queue Coordinator \u2014 spawns job queue slave processes to run scheduled jobs.<\/td><\/tr><tr><td>FBDA<\/td><td>Flashback Data Archive<\/td><td>Archives rows for Flashback Data Archive (Total Recall).<\/td><\/tr><tr><td>SMCO<\/td><td>Space Management<\/td><td>Proactive space management \u2014 preallocates extents, manages space pressure.<\/td><\/tr><tr><td>DMON<\/td><td>Data Guard Broker<\/td><td>Data Guard Monitor \u2014 runs when DG_BROKER_START=TRUE. Manages DG configuration.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">7.3 \u2014 Check Running Background Processes<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code># View all Oracle background processes for a specific SID\nps -ef | grep ora_.*_ORCL | grep -v grep | sort\n\n# Count background processes\nps -ef | grep ora_.*_ORCL | grep -v grep | wc -l<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check background processes from inside Oracle\nset linesize 200\nset pagesize 100\ncol pname   for a12\ncol program for a30\ncol status  for a10\ncol pid     for 9999\n\nSELECT p.pid,\n       p.spid                             os_pid,\n       b.name                             pname,\n       b.description,\n       p.program\nFROM   v$process      p,\n       v$bgprocess    b\nWHERE  p.addr         = b.paddr\nAND    b.paddr       != '00'\nORDER BY b.name;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">7.4 \u2014 Understanding the Checkpoint Process<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is a checkpoint?<\/strong> A checkpoint is a synchronization point between the buffer cache and the datafiles. During a checkpoint, Oracle writes all dirty blocks (modified blocks that have not yet been written to disk) from the buffer cache to the datafiles, then updates the control file and datafile headers with the checkpoint SCN.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why checkpoints matter:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After a crash, Oracle only needs to apply redo from the last checkpoint forward \u2014 not from the beginning<\/li>\n\n\n\n<li>More frequent checkpoints = faster crash recovery but more I\/O during normal operation<\/li>\n\n\n\n<li>Larger redo logs = less frequent checkpoints = less I\/O but slower crash recovery<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>Checkpoint Mechanics:\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n                    Last Checkpoint            Current\n                        SCN                    SCN\nREDO LOG: \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\n                        \u2502                      \u2502\n                        \u2502\u25c4\u2500\u2500 Recovery needed \u2500\u2500\u25ba\u2502\n                        \u2502    if instance crashes \u2502\n                        \u2502    (apply this redo)  \u2502\n                        \u2502\n                    Checkpoint writes:\n                    - Dirty blocks \u2192 Datafiles\n                    - Checkpoint SCN \u2192 Control file headers\n                    - Checkpoint SCN \u2192 Datafile headers<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check checkpoint frequency\nset linesize 200\nset pagesize 50\n\nSELECT name, value\nFROM   v$sysstat\nWHERE  name IN (\n    'background checkpoints completed',\n    'background checkpoints started'\n)\nORDER BY name;\n\n-- Current checkpoint SCN\nSELECT checkpoint_change#\nFROM   v$database;\n\n-- Checkpoint lag per datafile\nset linesize 200\nset pagesize 100\ncol file#      for 999\ncol name       for a60\ncol checkpoint_change# for 9999999999999\n\nSELECT f.file#,\n       f.name,\n       f.checkpoint_change#\nFROM   v$datafile f\nORDER BY f.file#;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. How Oracle Processes a SQL Statement<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Understanding this flow is essential for performance tuning. Every SQL tuning activity (explain plans, SQL profiles, bind variables) makes sense once you understand how Oracle processes a statement.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">8.1 \u2014 SQL Processing Steps<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>CLIENT sends SQL: SELECT * FROM hr.employees WHERE department_id = 10\n\nSTEP 1: PARSE\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  \u251c\u2500\u2500 Check Library Cache for matching SQL (SOFT PARSE if found)\n  \u251c\u2500\u2500 Syntax Check (is the SQL grammatically correct?)\n  \u251c\u2500\u2500 Semantic Check (do the tables and columns exist? does user have access?)\n  \u251c\u2500\u2500 Security Check (does the user have SELECT privilege on employees?)\n  \u2514\u2500\u2500 HARD PARSE (if not in Library Cache):\n      \u251c\u2500\u2500 Query Transformation (rewrites query if needed)\n      \u251c\u2500\u2500 Statistics Check (are table\/index stats available?)\n      \u251c\u2500\u2500 Optimizer chooses best execution plan (CBO \u2014 Cost-Based Optimizer)\n      \u2514\u2500\u2500 Execution plan stored in Library Cache\n\nSTEP 2: BIND\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  \u2514\u2500\u2500 If bind variables used (:dept_id), replace with actual values\n\nSTEP 3: EXECUTE\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  \u251c\u2500\u2500 For DML (INSERT\/UPDATE\/DELETE):\n  \u2502   \u251c\u2500\u2500 Lock required rows\n  \u2502   \u251c\u2500\u2500 Read current block from buffer cache (or disk if not cached)\n  \u2502   \u251c\u2500\u2500 Create undo record (before-image in UNDO segment)\n  \u2502   \u251c\u2500\u2500 Modify block in buffer cache (dirty block)\n  \u2502   \u2514\u2500\u2500 Write redo entry to Redo Log Buffer\n  \u2502\n  \u2514\u2500\u2500 For SELECT:\n      \u251c\u2500\u2500 Check buffer cache for needed blocks\n      \u251c\u2500\u2500 Read missing blocks from datafiles into buffer cache\n      \u2514\u2500\u2500 Return rows to client\n\nSTEP 4: FETCH (SELECT only)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  \u2514\u2500\u2500 Return rows to client in batches (arraysize)\n\nSTEP 5: COMMIT (DML only)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  \u251c\u2500\u2500 LGWR writes Redo Log Buffer to redo log file on disk\n  \u251c\u2500\u2500 Commit SCN assigned\n  \u251c\u2500\u2500 Locks released\n  \u2514\u2500\u2500 Dirty blocks remain in buffer cache (written to disk by DBWn later)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">8.2 \u2014 Read Consistency \u2014 How Oracle Sees a Consistent Snapshot<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>One of Oracle&#8217;s most important features:<\/strong> When you run a query, Oracle guarantees you see a consistent snapshot of the data as of the moment the query started \u2014 even if other sessions are modifying that data while your query runs. This is called Read Consistency and it is achieved using UNDO data.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How it works:<\/strong> If your query starts at SCN 1000 and needs to read a block that has been modified by another session to SCN 1050, Oracle reads the current block then applies the UNDO records to reconstruct what the block looked like at SCN 1000. This is why:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>ORA-01555: Snapshot too old<\/code> occurs when UNDO data needed by your query has been overwritten<\/li>\n\n\n\n<li>UNDO_RETENTION parameter controls how long undo data is kept<\/li>\n\n\n\n<li>Long-running queries need more undo data<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check current SCN (System Change Number)\n-- Every commit gets a unique SCN -- Oracle's global clock\nSELECT current_scn FROM v$database;\n\n-- Check undo usage and ORA-01555 occurrences\nset linesize 200\nset pagesize 100\ncol begin_time    for a25\ncol maxquerylen   for 9999999\ncol ssolderrcnt   for 9999\ncol undoblks      for 9999999\n\nSELECT TO_CHAR(begin_time,'YYYY-MM-DD HH24:MI') begin_time,\n       maxquerylen,\n       ssolderrcnt,    -- ORA-01555 snapshot too old errors\n       undoblks\nFROM   v$undostat\nORDER BY begin_time DESC\nFETCH FIRST 10 ROWS ONLY;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">9. Oracle Connection Models<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How do client applications actually connect to Oracle? There are three models and understanding them helps you size the database correctly and troubleshoot connection issues.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">9.1 \u2014 Dedicated Server Connection (Default)<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How it works:<\/strong> Each client connection gets its own dedicated server process on the database server. The server process exists only for that one client and is destroyed when the client disconnects.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>CLIENT PROCESS    \u2190\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25ba    DEDICATED SERVER PROCESS\n(on client machine)    TCP\/IP network      (on database server)\n                                           \u25cf Only serves this one client\n                                           \u25cf Has its own PGA\n                                           \u25cf Lives until client disconnects<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Pros:<\/strong> Simple, no shared state issues, full PGA available.<br><strong>Cons:<\/strong> 1000 clients = 1000 server processes = significant RAM and OS overhead.<br><strong>Best for:<\/strong> Moderate number of long-lived connections (OLTP applications, ETL, batch).<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">9.2 \u2014 Shared Server Connection<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How it works:<\/strong> Multiple clients share a small pool of server processes. A Dispatcher process accepts client connections and queues requests. Server processes pick up requests from the queue, process them, and return results through the Dispatcher.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>CLIENT 1 \u2500\u2500\u25ba\u2510\nCLIENT 2 \u2500\u2500\u25ba\u251c\u2500\u2500\u25ba DISPATCHER \u2500\u2500\u25ba REQUEST QUEUE \u2500\u2500\u25ba SHARED SERVER 1\nCLIENT 3 \u2500\u2500\u25ba\u2502                                  \u2500\u2500\u25ba SHARED SERVER 2\nCLIENT 4 \u2500\u2500\u25ba\u2518                                  \u2500\u2500\u25ba SHARED SERVER 3\n                                           (small pool serves many clients)<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Pros:<\/strong> 1000 clients can share 20 server processes \u2014 huge memory saving.<br><strong>Cons:<\/strong> More complex, UGA lives in Large Pool (not PGA), some restrictions on features.<br><strong>Best for:<\/strong> Many short-lived connections (web applications).<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check if shared server is configured\nSHOW PARAMETER shared_servers;\nSHOW PARAMETER dispatchers;\n\n-- Check active dispatchers\nSELECT name, status, dispatched, circuit, idle, busy, created\nFROM   v$dispatcher;\n\n-- Check shared server processes\nSELECT name, status, requests, idle, busy\nFROM   v$shared_server;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">9.3 \u2014 DRCP \u2014 Database Resident Connection Pooling<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>How it works:<\/strong> A pool of server processes is maintained by Oracle in the database itself. Client connections borrow a process from the pool, use it, and return it. Similar to a middleware connection pool but built into Oracle.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Covered in detail in SOP 14 \u2014 Oracle Network and Connectivity.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">9.4 \u2014 Check Current Connection Model in Use<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check what type of server each session is using\nset linesize 200\nset pagesize 100\ncol sid       for 9999\ncol username  for a15\ncol server    for a12\ncol program   for a30\n\nSELECT sid, username, server, program\nFROM   v$session\nWHERE  type     = 'USER'\nAND    username IS NOT NULL\nORDER BY server, username;\n\n-- server = DEDICATED, SHARED, or PSEUDO (background)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">10. Oracle Data Storage Internals<\/h3>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">10.1 \u2014 Oracle Block Structure<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is an Oracle block?<\/strong> An Oracle block (also called a data block or page) is the smallest unit of I\/O in Oracle. Default size is 8KB. Every read and write operation transfers at least one complete block. Each block has a specific internal structure.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>ORACLE BLOCK STRUCTURE (8KB default)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 BLOCK HEADER                    \u2502 \u2190 Block address, block type, transaction slots\n\u2502 (fixed, ~100 bytes)             \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 TABLE DIRECTORY                 \u2502 \u2190 Which tables have rows in this block\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 ROW DIRECTORY                   \u2502 \u2190 Pointers to where each row starts in block\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502         FREE SPACE              \u2502 \u2190 Available space for new rows and row growth\n\u2502                                 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 ROW DATA (rows stored here)     \u2502 \u2190 Actual row data, most recent row first\n\u2502 Row 5: &#91;data...]                \u2502\n\u2502 Row 4: &#91;data...]                \u2502\n\u2502 Row 3: &#91;data...]                \u2502\n\u2502 Row 2: &#91;data...]                \u2502\n\u2502 Row 1: &#91;data...]                \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\nPCTFREE: Reserve this % of block for row updates (default 10%)\nPCTUSED: Minimum % used before block goes back on free list (default 40%)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">10.2 \u2014 Row Chaining and Row Migration<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Row chaining:<\/strong> When a single row is too large to fit in one block, it is chained across multiple blocks. Oracle must read multiple blocks to retrieve one row \u2014 performance impact.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Row migration:<\/strong> When an UPDATE increases a row&#8217;s size beyond the free space in its current block, Oracle moves the entire row to a new block but leaves a forwarding pointer in the original block. A SELECT must read both the original block (for the pointer) and the new block (for the data) \u2014 performance impact.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check for chained rows (requires table analysis first)\nANALYZE TABLE hr.employees COMPUTE STATISTICS;\n\nSELECT num_rows, chain_cnt, avg_row_len, blocks, empty_blocks\nFROM   dba_tables\nWHERE  owner      = 'HR'\nAND    table_name = 'EMPLOYEES';\n\n-- High chain_cnt relative to num_rows indicates a problem\n-- Fix: Export the table data, truncate, and reimport\n-- OR: ALTER TABLE ... MOVE (reorganizes blocks)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">10.3 \u2014 High Water Mark (HWM)<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is HWM?<\/strong> The High Water Mark is the boundary in a segment that marks the highest point of data that has ever been written. Full Table Scans read ALL blocks up to the HWM \u2014 even empty blocks where rows have been deleted.<\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Why is HWM important?<\/strong> If you delete 90% of rows in a table without truncating, the HWM stays high. Full table scans still read all the empty blocks up to the HWM \u2014 just as slow as before the delete. TRUNCATE resets the HWM to zero. DELETE does not.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check HWM and actual space usage for a table\nset linesize 200\nset pagesize 50\ncol owner       for a15\ncol table_name  for a30\ncol total_blocks for 9999999\ncol used_blocks  for 9999999\ncol empty_blocks for 9999999\ncol wasted_pct   for 999.99\n\nSELECT owner,\n       table_name,\n       blocks          total_blocks,\n       num_rows,\n       empty_blocks,\n       ROUND(empty_blocks*100\/NULLIF(blocks,0),2) wasted_pct\nFROM   dba_tables\nWHERE  owner      = 'HR'\nORDER BY wasted_pct DESC;\n\n-- Reclaim space below HWM (reorganizes table, resets HWM)\n-- This requires additional free space equal to table size\n-- ALTER TABLE hr.employees MOVE;\n-- Then rebuild indexes (MOVE invalidates indexes):\n-- ALTER INDEX hr.emp_emp_id_pk REBUILD;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">11. Redo and Undo Architecture Together<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Redo and Undo work together as Oracle&#8217;s ACID compliance mechanism. Understanding both together is critical.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>SESSION changes a row (UPDATE employees SET salary=6000 WHERE id=100):\n\nBEFORE THE CHANGE:\n  Row in EMPLOYEES table: id=100, salary=5000\n\nDURING THE CHANGE:\n  Step 1: Read block containing id=100 into buffer cache\n  Step 2: Write UNDO record: \"for row id=100, salary WAS 5000\"\n           \u2192 Written to UNDO tablespace (allows rollback and read consistency)\n  Step 3: Write REDO record: \"id=100, salary NOW 6000\"\n           \u2192 Written to Redo Log Buffer (allows crash recovery)\n  Step 4: Modify the row in buffer cache: salary = 6000\n\nAFTER COMMIT:\n  \u2192 LGWR flushes Redo Log Buffer to redo log file (DURABLE)\n  \u2192 Session's locks released\n  \u2192 Undo data kept for UNDO_RETENTION seconds (for read consistency of other queries)\n\nAFTER ROLLBACK:\n  \u2192 Oracle reads UNDO record and reverses the change\n  \u2192 salary goes back to 5000\n  \u2192 Redo records for the rolled-back transaction are also written\n    (redo records the rollback itself -- so it can be replayed after crash)\n\nAFTER CRASH (before commit):\n  \u2192 At next startup, SMON runs instance recovery\n  \u2192 SMON reads redo log and rolls FORWARD all changes (including uncommitted)\n  \u2192 Then SMON reads undo and rolls BACK all uncommitted transactions<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">12. CDB and PDB Architecture (19c Standard)<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>What is CDB\/PDB?<\/strong> Oracle 12c introduced the Multitenant architecture. A Container Database (CDB) is an Oracle instance that can host multiple Pluggable Databases (PDBs). Each PDB appears as an independent database to applications but they all share the CDB&#8217;s SGA, background processes, and redo logs. This reduces overhead significantly when managing many databases.<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>CDB (Container Database)\n\u251c\u2500\u2500 CDB$ROOT (Root Container)\n\u2502   \u251c\u2500\u2500 System tablespaces (SYSTEM, SYSAUX, UNDO, TEMP)\n\u2502   \u251c\u2500\u2500 Common users (C## prefix)\n\u2502   \u251c\u2500\u2500 Shared SGA and background processes\n\u2502   \u2514\u2500\u2500 Shared redo logs\n\u2502\n\u251c\u2500\u2500 PDB$SEED (Seed PDB \u2014 read-only template for new PDBs)\n\u2502\n\u251c\u2500\u2500 PDB1 (Pluggable Database 1 \u2014 Production App)\n\u2502   \u251c\u2500\u2500 Own SYSTEM, SYSAUX tablespaces\n\u2502   \u251c\u2500\u2500 Own application tablespaces\n\u2502   \u251c\u2500\u2500 Local users (no C## prefix)\n\u2502   \u2514\u2500\u2500 Own service name for client connections\n\u2502\n\u2514\u2500\u2500 PDB2 (Pluggable Database 2 \u2014 HR System)\n    \u251c\u2500\u2500 Own SYSTEM, SYSAUX tablespaces\n    \u251c\u2500\u2500 Own application tablespaces\n    \u2514\u2500\u2500 Own service name for client connections<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check if this is a CDB\nSELECT cdb, con_id, name FROM v$database;\n\n-- List all containers (root + PDBs)\nset linesize 200\nset pagesize 100\ncol name      for a20\ncol open_mode for a15\ncol status    for a12\n\nSELECT con_id, name, open_mode, restricted\nFROM   v$pdbs\nORDER BY con_id;\n\n-- Switch to a specific PDB\nALTER SESSION SET CONTAINER = PDB1;\n\n-- Switch back to root\nALTER SESSION SET CONTAINER = CDB$ROOT;\n\n-- Check which container you are in\nSELECT sys_context('USERENV','CON_NAME') current_container FROM dual;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">13. Architecture Diagnostic Queries (Daily Use)<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcdd <strong>Use these queries as a quick architecture health check. They combine all the architectural concepts covered in this SOP.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">13.1 \u2014 Complete Instance Health Snapshot<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>sqlplus \/ as sysdba\n\n-- ===== INSTANCE OVERVIEW =====\nset linesize 200\nset pagesize 50\ncol instance_name for a15\ncol host_name     for a25\ncol version_full  for a20\ncol status        for a12\ncol startup_time  for a25\n\nSELECT instance_name, host_name, version_full, status,\n       TO_CHAR(startup_time,'YYYY-MM-DD HH24:MI:SS') startup_time,\n       ROUND((SYSDATE-startup_time)*24,1) uptime_hours\nFROM   v$instance;\n\n-- ===== DATABASE OVERVIEW =====\nset linesize 200\ncol name           for a12\ncol db_unique_name for a20\ncol open_mode      for a15\ncol log_mode       for a15\ncol database_role  for a20\n\nSELECT name, db_unique_name, open_mode, log_mode, database_role\nFROM   v$database;\n\n-- ===== SGA SUMMARY =====\nset linesize 200\ncol name     for a30\ncol value_mb for 9999999.99\n\nSELECT name, ROUND(value\/1024\/1024,2) value_mb\nFROM   v$sga\nORDER BY value DESC;\n\n-- ===== MEMORY PARAMETERS =====\nset linesize 200\ncol name  for a35\ncol value for a20\n\nSELECT name, value\nFROM   v$parameter\nWHERE  name IN (\n    'sga_target','pga_aggregate_target',\n    'db_cache_size','shared_pool_size',\n    'log_buffer','large_pool_size'\n)\nORDER BY name;\n\n-- ===== ACTIVE BACKGROUND PROCESSES =====\nset linesize 200\ncol pname       for a10\ncol description for a60\n\nSELECT b.name pname, b.description\nFROM   v$bgprocess b\nWHERE  b.paddr != '00'\nORDER BY b.name;\n\n-- ===== CURRENT REDO LOG STATUS =====\nset linesize 200\ncol l#     for 999\ncol status for a12\ncol member for a60\n\nSELECT l.group# l#, l.sequence#,\n       l.bytes\/1024\/1024 size_mb,\n       l.status, l.archived, f.member\nFROM   v$log l, v$logfile f\nWHERE  l.group# = f.group#\nORDER BY l.group#;\n\n-- ===== BUFFER CACHE HIT RATIO =====\nSELECT ROUND(\n    (1-(phy.value\/NULLIF(con.value+cur.value,0)))*100,2\n) buffer_cache_hit_pct\nFROM   v$sysstat phy, v$sysstat con, v$sysstat cur\nWHERE  phy.name='physical reads'\nAND    con.name='consistent gets'\nAND    cur.name='db block gets';\n\n-- ===== CURRENT WAIT EVENTS =====\nset linesize 200\ncol event      for a40\ncol wait_class for a20\ncol cnt        for 9999\n\nSELECT event, wait_class, COUNT(*) cnt\nFROM   v$session\nWHERE  wait_class != 'Idle'\nAND    type        = 'USER'\nGROUP BY event, wait_class\nORDER BY cnt DESC\nFETCH FIRST 10 ROWS ONLY;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">13.2 \u2014 Architecture Reference Queries<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Check all datafiles and their tablespaces\nset linesize 200\nset pagesize 100\ncol file#           for 999\ncol tablespace_name for a25\ncol size_mb         for 9999999\ncol autoextensible  for a5\ncol name            for a70\n\nSELECT f.file#,\n       t.name          tablespace_name,\n       f.status,\n       ROUND(f.bytes\/1024\/1024,2)   size_mb,\n       f.autoextensible,\n       f.name\nFROM   v$datafile  f,\n       v$tablespace t\nWHERE  f.ts# = t.ts#\nORDER BY t.name, f.file#;\n\n-- Check control file locations\nSELECT name FROM v$controlfile;\n\n-- Check parameter file in use\nSELECT decode(value,NULL,'PFILE','SPFILE') type, value\nFROM   v$parameter WHERE name = 'spfile';\n\n-- Check archive log mode\nSELECT log_mode FROM v$database;\n\n-- Check if HugePages is configured (important for large SGA)\n-- (Run as root on OS level)\n-- grep HugePages \/proc\/meminfo<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">14. Architecture Quick Reference Card<\/h3>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Concept<\/th><th>Key Fact<\/th><th>Check Command<\/th><\/tr><\/thead><tbody><tr><td>Instance vs Database<\/td><td>Instance = RAM + processes. Database = files on disk<\/td><td><code>SELECT status FROM v$instance; SELECT open_mode FROM v$database;<\/code><\/td><\/tr><tr><td>SGA<\/td><td>Shared memory for all sessions<\/td><td><code>SELECT name,value\/1024\/1024 mb FROM v$sga;<\/code><\/td><\/tr><tr><td>Buffer Cache<\/td><td>Cached data blocks. Target hit ratio &gt;95%<\/td><td><code>SELECT (1-phy.value\/(con.value+cur.value))*100 FROM v$sysstat...<\/code><\/td><\/tr><tr><td>Shared Pool<\/td><td>SQL cache + dictionary cache. Target hit &gt;99%<\/td><td><code>SELECT gethitratio FROM v$librarycache WHERE namespace='SQL AREA';<\/code><\/td><\/tr><tr><td>Redo Log Buffer<\/td><td>Temporary redo before LGWR writes to disk<\/td><td><code>SHOW PARAMETER log_buffer;<\/code><\/td><\/tr><tr><td>Large Pool<\/td><td>RMAN, shared server, parallel query memory<\/td><td><code>SELECT bytes\/1024\/1024 FROM v$sgastat WHERE name='free memory' AND pool='large pool';<\/code><\/td><\/tr><tr><td>PGA<\/td><td>Private memory per session for sorts and joins<\/td><td><code>SELECT value FROM v$pgastat WHERE name='total PGA allocated';<\/code><\/td><\/tr><tr><td>PMON<\/td><td>Cleans up dead sessions, registers with listener<\/td><td><code>ps -ef | grep ora_pmon<\/code><\/td><\/tr><tr><td>SMON<\/td><td>Instance recovery, free space coalescing<\/td><td><code>ps -ef | grep ora_smon<\/code><\/td><\/tr><tr><td>DBWR<\/td><td>Writes dirty blocks to datafiles<\/td><td><code>ps -ef | grep ora_dbw<\/code><\/td><\/tr><tr><td>LGWR<\/td><td>Writes redo to log files \u2014 triggered by COMMIT<\/td><td><code>ps -ef | grep ora_lgwr<\/code><\/td><\/tr><tr><td>CKPT<\/td><td>Updates headers at checkpoint<\/td><td><code>ps -ef | grep ora_ckpt<\/code><\/td><\/tr><tr><td>ARCn<\/td><td>Archives completed redo log groups<\/td><td><code>ps -ef | grep ora_arc<\/code><\/td><\/tr><tr><td>Datafile<\/td><td>Stores table\/index data. One tablespace per file<\/td><td><code>SELECT name,status FROM v$datafile;<\/code><\/td><\/tr><tr><td>Control file<\/td><td>Master file \u2014 lists all other files<\/td><td><code>SELECT name FROM v$controlfile;<\/code><\/td><\/tr><tr><td>Redo log<\/td><td>Records all changes for crash recovery<\/td><td><code>SELECT group#,status,archived FROM v$log;<\/code><\/td><\/tr><tr><td>Archive log<\/td><td>Copy of redo log for point-in-time recovery<\/td><td><code>ARCHIVE LOG LIST;<\/code><\/td><\/tr><tr><td>spfile<\/td><td>Binary parameter file \u2014 changed by ALTER SYSTEM<\/td><td><code>SHOW PARAMETER spfile;<\/code><\/td><\/tr><tr><td>HWM<\/td><td>Highest point ever written \u2014 FTS reads to here<\/td><td><code>SELECT blocks,empty_blocks FROM dba_tables;<\/code><\/td><\/tr><tr><td>SCN<\/td><td>Oracle&#8217;s global clock \u2014 every commit gets one<\/td><td><code>SELECT current_scn FROM v$database;<\/code><\/td><\/tr><tr><td>UNDO<\/td><td>Before-images for rollback and read consistency<\/td><td><code>SELECT ssolderrcnt FROM v$undostat;<\/code><\/td><\/tr><tr><td>CDB<\/td><td>Container database hosting multiple PDBs<\/td><td><code>SELECT cdb FROM v$database;<\/code><\/td><\/tr><tr><td>PDB<\/td><td>Pluggable database \u2014 appears independent to apps<\/td><td><code>SELECT name,open_mode FROM v$pdbs;<\/code><\/td><\/tr><tr><td>Hard Parse<\/td><td>Full SQL optimization \u2014 expensive, avoid with bind vars<\/td><td><code>SELECT value FROM v$sysstat WHERE name='parse count (hard)';<\/code><\/td><\/tr><tr><td>Soft Parse<\/td><td>Reuse cached SQL plan \u2014 cheap<\/td><td><code>SELECT value FROM v$sysstat WHERE name='parse count (total)';<\/code><\/td><\/tr><tr><td>MOS Architecture<\/td><td>Doc ID 1523319.1<\/td><td>\u2014<\/td><\/tr><tr><td>MOS SGA\/Memory<\/td><td>Doc ID 430473.1<\/td><td>\u2014<\/td><\/tr><tr><td>MOS Background Processes<\/td><td>Doc ID 1549180.1<\/td><td>\u2014<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">This SOP covers everything you need to understand Oracle Database architecture from the ground up. The instance lives in RAM and the database lives on disk \u2014 always keep that distinction clear. Every DBA activity \u2014 backup, recovery, patching, performance tuning, Data Guard, RAC \u2014 makes more sense once you understand how SGA components, background processes, and physical files work together. When you see a performance problem, think about which SGA component or background process is involved. When you see a recovery scenario, think about which physical files are affected. Architecture knowledge is the foundation that makes all other DBA skills click into place.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A complete production-ready SOP covering Oracle Database architecture from the ground up. Covers physical and logical storage structures, Oracle instance components, SGA and its sub-components, PGA, background processes, connection models, memory management, redo and undo internals, and how everything works together \u2014 with real commands, diagnostic queries, and consultant-level notes that connect architecture to real-world [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5823,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1534],"tags":[],"class_list":["post-5821","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle-sop"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=5821"}],"version-history":[{"count":1,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5821\/revisions"}],"predecessor-version":[{"id":5824,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/5821\/revisions\/5824"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media\/5823"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=5821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=5821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=5821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}