Oracle Database Architecture Diagram Overview
Oracle Database Architecture Diagram Overview
1. User Processes – These are the applications or users that request data or send commands
to the database. Each user process interacts with the server processes.
2. Server Processes – These handle user requests by communicating with the database.
Server processes execute SQL queries, retrieve data, and manage transactions.
3. Oracle Instance Components:
o System Global Area (SGA) – The shared memory structure that holds data and
control information for the Oracle instance. Key components in SGA include:
Database Buffer Cache – Stores data blocks read from the database.
Shared Pool – Holds shared SQL areas, PL/SQL code, and data
dictionary information.
Redo Log Buffer – Stores redo entries to be written to the redo log files,
which track all changes to the database.
Large Pool, Java Pool, Streams Pool – Additional memory pools for
specific functions like large allocations, Java code, and data streams.
o Program Global Area (PGA) – Private memory for each server process. It
contains session-specific data, sort areas, and cursor states.
4. Background Processes:
o Database Writer (DBWn) – Writes modified data from the buffer cache to disk.
o Log Writer (LGWR) – Writes redo log entries from the redo log buffer to the
online redo log files.
o Checkpoint (CKPT) – Updates data file headers and control files with
checkpoint information.
o System Monitor (SMON) – Recovers the database after a crash.
o Process Monitor (PMON) – Cleans up processes that have failed.
o Archiver (ARCn) – Copies redo log files to an archive location for recovery.
5. Data Files and Storage:
o Data Files – Store actual database data.
o Control Files – Keep information about the database structure, like data file and
log file locations.
o Redo Log Files – Track changes to the database to enable recovery.
6. Oracle Database – The physical data storage layer, made up of data files, redo log files,
and control files, ensuring data persistence.
Script: "Let's start with the User Process, which represents applications or users sending
requests to the database. These requests typically involve querying data or performing
transactions. Once a user initiates a request, it is received by the Server Process."
2. Server Process:
Script: "The Server Process is responsible for handling the user’s request. It performs
several key functions:
o First, it parses the SQL statement to check its syntax and ensure the user has the
necessary permissions.
o Then, it searches the Shared Pool in the System Global Area (SGA) for any
existing execution plans to optimize performance.
o If the data being requested is already cached in the Database Buffer Cache, the
server retrieves it directly, which speeds up the response time. If not, it fetches the
data from disk."
Script: "Next, we have the Database Writer process, or DBWn. This process is
responsible for writing modified data from the Database Buffer Cache to the Data Files
on disk. Since writing to disk can slow down performance, DBWn works
asynchronously, meaning it does not delay the user’s transaction."
Script: "The Checkpoint (CKPT) process periodically saves the state of the database by
updating Control Files and Data File Headers with checkpoint information. This
minimizes the amount of work required to recover the database after an unexpected
shutdown."
Script: "The System Monitor, or SMON, is responsible for recovering the database in the
event of a crash. When the database restarts, SMON applies any changes recorded in the
redo logs to bring the database back to a consistent state."
Script: "The Process Monitor (PMON) process handles cleanup when user connections
are disrupted. If a user disconnects unexpectedly, PMON cleans up and frees any
resources they were using, ensuring that the system remains optimized for performance."
Script: "Finally, we have the Archiver (ARCn) process. This process copies the redo logs
to an archive location after they fill up. Archiving the logs is essential for backup and
recovery, allowing you to restore the database to a specific point in time."
Conclusion:
Script: "In summary, these processes work together to handle user requests efficiently,
ensure data integrity, and enable reliable recovery. Each component in the Oracle
architecture has a specialized role, contributing to a powerful and resilient database
system."
In an Oracle database, there are several essential system tables that are crucial for managing and
maintaining the database. These tables store metadata, configuration settings, and other critical
information about the database. Below are some of the most important tables and their
descriptions:
1. DBA_TABLES
Description: This view provides information about all tables in the database. It includes
data about table names, owners, creation dates, and storage settings.
Key Columns:
o OWNER: The owner of the table.
o TABLE_NAME: The name of the table.
o TABLESPACE_NAME: The name of the tablespace where the table is stored.
o NUM_ROWS: The number of rows in the table.
2. USER_TABLES
Description: Similar to DBA_TABLES, but it shows only the tables owned by the current
user.
Key Columns:
o TABLE_NAME: The name of the table.
o TABLESPACE_NAME: The tablespace in which the table resides.
3. ALL_TABLES
Description: This view provides information about all tables that are accessible to the
current user, including tables owned by other users.
Key Columns:
o OWNER: The owner of the table.
o TABLE_NAME: The name of the table.
4. DBA_USERS
5. USER_USERS
Description: Contains information about the current user, similar to DBA_USERS, but only
for the current database user.
Key Columns:
o USERNAME: The name of the current user.
o ACCOUNT_STATUS: The status of the user's account.
6. DBA_TAB_COLUMNS
Description: Provides metadata about columns in tables across the entire database.
Key Columns:
o OWNER: The owner of the table.
o TABLE_NAME: The name of the table.
o COLUMN_NAME: The name of the column.
o DATA_TYPE: The data type of the column.
7. USER_TAB_COLUMNS
Description: Similar to DBA_TAB_COLUMNS, but only for tables owned by the current user.
Key Columns:
o COLUMN_NAME: The column name.
o DATA_TYPE: The column's data type.
8. DBA_INDEXES
9. USER_INDEXES
Description: Similar to DBA_INDEXES, but it lists only the indexes owned by the current
user.
Key Columns:
o INDEX_NAME: The name of the index.
o TABLE_NAME: The name of the table for which the index was created.
10. V$SESSION
11. V$DATABASE
12. DBA_DATA_FILES
Description: Contains information about the data files in the database.
Key Columns:
o FILE_NAME: The name of the data file.
o TABLESPACE_NAME: The name of the tablespace.
o BYTES: The size of the data file.
13. DBA_LOG_FILES
14. V$INSTANCE
15. DBA_UTILITY
Description: Provides details about the utility operations performed in the database (like
export, import, etc.).
Key Columns:
o OPERATION: The name of the utility operation.
o STATUS: The current status of the operation.
16. V$SQL
Description: Contains information about SQL statements that are currently in the shared
pool of the Oracle instance.
Key Columns:
o SQL_ID: The unique identifier of the SQL statement.
o SQL_TEXT: The text of the SQL statement.
o PARSE_CALLS: The number of times the SQL statement has been parsed.
These system views and tables are critical for monitoring and managing the Oracle database.
Depending on your specific role, you might interact more with some tables (e.g., DBA for
administrators, USER for individual developers) to manage schema, troubleshoot performance,
or analyze the health of the system.