Week 2-3 ORACLE Architecture
Week 2-3 ORACLE Architecture
• The tradeoff:
– Trusting a cloud provider to store and manage your data in
return for minimizing database administration and
maintenance cost and effort.
• Utilizing cloud database systems can enable
organizations, especially smaller ones without the
resources to invest in an enterprise computing
infrastructure, to focus on their business instead of
their computing environment.
Listener RDBMS
Instance Database
Instance Files
Memory Structures Processe
s •CONTROL FILE
PGA SGA •REDO FILE
Buffer Cache •ARCHIVED REDO LOGS
•PMON
Shared Pool •SYSTEM DATAFILE
•SMON
Log Buffer •SYSAUX DATAFILE
•DBWn
Large Pool •TEMPFILE
•CKPT
Java Pool •UNDO DATAFILE
•LOGW
Streams Pool •DATA-SPECIFIC
R
•ARCn DATAFILES
Oracle Architecture – Instance &
Database
• Oracle Architecture can be
broken into the following parts:
1. Instance, which is a combination
of:
• Background Processes (CPU)
• Memory Structures (RAM)
2. Database.
• Physical component or the files.
Oracle Architecture Cont.
• Here are some rules to consider:
1. An instance can exist without a
database ..!
2. A database can exist without an
instance, however …
3. An instance can only access one
database.
4. You can set up multiple instances
to access the same set of files or
one database.
Background Processes
• PMON: Process Monitor
– Regulates all other processes.
– Cleans up dead processes.
– Must be alive.
Background Processes
• SMON: System Monitor
– Two primary Responsibilities:
• Responsible for instance recovery.
• Clean up temporary files.
Background Processes
• DBWn: Database Writer
– Operations are done in RAM.
– Writes dirty buffers to data file
– The “n” in DBWn means we can
have multiple database writer
processes (Why???)
Background Processes
• CKPT: Checkpoint Process
– Blocks and buffers – Dirty and
clean.
– CKPT signals writing of dirty
buffers to disk.
– Full and incremental checkpoints.
Background Processes
• LGWR: Log Writer Process
– Recoverability Architecture.
– Every change written to files for
recovery.
– First to memory, then disk as redo
logs.
Background Processes
• ARCn: Archiver Process
– NOARCHIVELOG vs ARCHIVELOG
mode.
– Copies redo logs to archive logs.
– Multiple destinations.
Background Processes
• Other Background Process
– MMON – Writes out the
performance metrics.
– MMAN – Automatically manages
memory.
– LREG – new process that registers
databases.
Memory Architecture
• SGA (System/Shared Global Area)
– allocated/deallocated
(startup/shutdown)
– Show SGA
• PGA (Program Global Area)
– Session connection memory for each
server process
System Global Area (SGA)
• Shared Pool
– The concept of parsing.
• Select ename from emp;
– Library cache – shares stored SQL.
– Data dictionary cache – stored
Metadata.
System Global Area (SGA)
• Log Buffer
– Holds info about the changes made
to DB files.
– Redo entries are used for recovery.
– Three conditions to write. (???)
System Global Area (SGA)
• Large Pool
– Benefits of Caching – frees up
shared pool.
– Used in the shared server
architecture.
– Caching for backup and recovery.
System Global Area (SGA)
– Notes:
• Pfile parameter not needed if SPFile exists
• SGA is allocated at instance startup
• Database startup cannot occur without the
Control File
Startup
Shutdown
Task #7 - Database
Creation
• Examine the Create Database
command
– Identify the Oracle architectural
components related to the architecture
discussed in today’s lecture.
• Where should DBA look for
explanations if Create database
command fails?
– What could cause that failure?