Professional Documents
Culture Documents
Oracle Server Arch Overview
Oracle Server Arch Overview
Oracle Database - Data files, Control files, Redo log files Other Files - Parameter file, Password file, Archive logs Oracle Instance - SGA (Shared Global Area) Buffer Cache Shared Pool Library Cache Data Dictionary Cache Redo Log Buffer Large Pool Java Pool - Background Processes DBWR, LGWR, SMON, PMON, CKPT, ARCH Other Processes - User processes - Server processes PGA Query Processing Rollback Segments
Server Process
Java Pool
(optional)
DBWR LGWR SMON PMON CKPT RECO ARCH LCKn Pnnn Dnnn SNPn
Oracle Database
Database Files
Data files
- Store the data - Can only be associated with 1 database - Form logical units called a tablespace
Control files
- Database name - Time stamp of database creation - Name and locations of all data files and redo log files
Other Files
Parameter files
- Store hundreds of parameters for the Oracle Instance
Password file
- Authenticates which users are allowed to start and stop the database
DBWR LGWR SMON PMON CKPT RECO ARCH LCKn Pnnn Dnnn SNPn
Shared Pool
Shared Pool
- Library Cache Stores the most recently used SQL statements - Data Dictionary Cache (Row Cache) Stores definitions of objects contained in the database Used to validate object names and privileges - Size is set by the SHARED_POOL_SIZE parameter in the initialization file (parameter file). SGA (System Global Area)
Java Pool
Large Pool
Buffer Cache
Area of memory used to store the most recently used data. Oracle knows which data is most likely to be used again by maintaining a list of recently used blocks called the LRU. Operation
- A request for data is made - Oracle checks the buffer cache to see if it exists - If not it grabs the block from disk (physical read) SGA (System Global Area) Database Shared Buffer Pool Cache Redo Log Buffer Java Pool Large Pool
8K
DB_BLOCK_BUFFERS = 5
8K
8K
Data is written from the redo log buffer to the redo log files by the log writer process
Oracle Instance SGA (System Global Area) Database Shared Buffer Pool Cache Redo Log Buffer Java Pool Large Pool
DBWR LGWR SMON PMON CKPT RECO ARCH LCKn Pnnn Dnnn SNPn
Background Processes
5 background processes are mandatory
Database Writer (DBWR) Log Writer (LGWR) System Monitor (SMON) Process Monitor (PMON) Checkpoint (CKPT) Required as of Oracle 8i
DBWR LGWR SMON PMON CKPT RECO ARCH LCKn Pnnn Dnnn SNPn
You can configure additional DBWR processes by setting the DB_WRITER_PROCESSES parameter in the parameter file
Checkpoint (CKPT)
Used to synchronize data files, mandatory in Oracle 8i
- In Oracle 8 takes it handles the task of updating the data file headers instead of log writer - Frequent checkpoints increase the speed of database recovery during instance failure but may hinder performance
Server Process
PGA
DBWR LGWR SMON PMON CKPT RECO ARCH LCKn Pnnn Dnnn SNPn
User Process
Query Processing
Parse Execute Fetch
Oracle Instance SGA (System Global Area)
PGA
Server Process
DBWR LGWR SMON PMON CKPT RECO ARCH LCKn Pnnn Dnnn SNPn
Query Processing
Parse
- SQL statement is passed from user process to server process - Server process looks in shared pool to see if SQL already exists - Validates SQL by checking the syntax - Checks the data dictionary to ensure all of the objects and columns actually exist - Locks on objects are obtained so the definition does not change - Checks the users privileges - Determines the execution plan - Loads the SQL and the plan into the shared SQL area
Executecontinued
Query Processing
Parse Execute
- Identifies the rows that are selected
Fetch
- Returns the rows to the user process and ordered if necessary
Rollback Segments
Record the before image before data is actually changed in the database Purpose
- Allows user to roll back a transaction - Allows other users to see the original image until the changes have been committed - Allows the database to be recovered if the instance fails