Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
35 views

Oracle Database Architecture Diagram Overview

Uploaded by

summersnoopy96
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Oracle Database Architecture Diagram Overview

Uploaded by

summersnoopy96
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

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.

Sequence Diagram for Oracle Database Processes

1. User Process: Initiates a request (e.g., an SQL query or transaction).


2. Server Process: Receives the request from the user and performs the following:
o Parses and checks SQL syntax and permissions.
o Searches for execution plans in the Shared Pool.
o Uses the Database Buffer Cache if the requested data is already in memory, or
requests data from the disk if needed.
3. Database Writer (DBWn): Updates modified blocks from the Database Buffer Cache
to Data Files on disk. This process is asynchronous and does not block user transactions.
4. Log Writer (LGWR): Writes transaction logs from the Redo Log Buffer to the Redo
Log Files. This process ensures that changes are logged before they are committed.
5. Checkpoint (CKPT): Updates Control Files and Data File Headers with checkpoint
information to ensure data consistency.
6. System Monitor (SMON): If required, performs recovery at startup or after a failure,
including instance recovery to bring the database back to a consistent state.
7. Process Monitor (PMON): Cleans up processes after a user disconnects or a process
fails, freeing up resources.
8. Archiver (ARCn): Copies filled Redo Log Files to archive storage for backup and
recovery purposes.

Oracle Database Process Sequence Explanation

1. Introduction to User Process:

 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."

3. Database Writer (DBWn):

 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."

4. Log Writer (LGWR):


 Script: "The Log Writer, or LGWR, manages data integrity and recovery. It captures
changes in the Redo Log Buffer and writes them to the Redo Log Files on disk. This
process ensures that if there’s a system failure, Oracle can recover all committed
transactions by replaying the redo logs."

5. Checkpoint Process (CKPT):

 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."

6. System Monitor (SMON):

 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."

7. Process Monitor (PMON):

 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."

8. Archiver Process (ARCn):

 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

 Description: Contains information about all database users.


 Key Columns:
o USERNAME: The name of the user.
o USER_ID: The user’s unique ID.
o ACCOUNT_STATUS: The status of the user's account (e.g., open, locked).

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

 Description: Contains information about all indexes in the database.


 Key Columns:
o OWNER: The owner of the index.
o INDEX_NAME: The name of the index.
o TABLE_NAME: The table associated with the index.
o UNIQUENESS: Whether the index is unique or not.

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

 Description: Provides information about the current sessions in the database.


 Key Columns:
o SID: Session ID.
o USERNAME: The name of the user associated with the session.
o STATUS: The status of the session (e.g., ACTIVE, INACTIVE).

11. V$DATABASE

 Description: Contains information about the current database instance.


 Key Columns:
o DBID: The unique identifier for the database.
o NAME: The name of the database.
o CREATION_TIME: The time when the database was created.

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

 Description: Stores information about redo log files in the database.


 Key Columns:
o LOG_FILE_NAME: The name of the log file.
o GROUP#: The log group number.
o ARCHIVED: Whether the log file has been archived or not.

14. V$INSTANCE

 Description: Provides details about the Oracle instance that is running.


 Key Columns:
o INSTANCE_NAME: The name of the Oracle instance.
o STATUS: The status of the instance (e.g., STARTED, MOUNTED).

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.

You might also like