0% found this document useful (0 votes)
5 views

Week 2-3 ORACLE Architecture

The document provides an overview of Oracle Corporation's history and its database architecture, detailing components such as instances, memory structures, and background processes. It emphasizes the importance of understanding Oracle architecture for effective database management, including troubleshooting and recovery. Additionally, it covers the roles of various processes and memory areas within the Oracle database system, as well as guidelines for database configuration and administration.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Week 2-3 ORACLE Architecture

The document provides an overview of Oracle Corporation's history and its database architecture, detailing components such as instances, memory structures, and background processes. It emphasizes the importance of understanding Oracle architecture for effective database management, including troubleshooting and recovery. Additionally, it covers the roles of various processes and memory areas within the Oracle database system, as well as guidelines for database configuration and administration.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 49

Oracle Architecture

Exploring the History of


Oracle
• Oracle Corporation as we know it,
began in 1977 as a company called
Software Development
Laboratories (SDL).
• Founded by Larry Ellison, Bob
Miner, and Ed Oates.
• Inspired by the relational theory set forth by Dr.
Ted Codd and the work done on an IBM project
known as System R
Understanding the Oracle
Database product
• The Oracle database is designed to be high
performing, highly available, and highly secure.
• It can run on a variety of hardware and
operating system platforms.
• The primary language used to access
Oracle databases is Structured Query
Language (SQL)
• Oracle database also supports the use of two
other programming languages within the
database: PL/SQL and Java.
Enterprise DBMS
• Designed for scalability and high performance
• Multiple users may connect concurrently
• Support for very large databases
• Supports multiple DB instances and
replication
• Runs on a high-end machine, or cluster(s)
– Mainframe
– Server (Unix, Linux, Windows Server)
• OLTP, Data Warehouse, …
• High cost
Cloud DBMS
• Cloud computing - on-demand access to a large
amount of computing resources - rent computing
power - “pay as you go”

• 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.

• smart phones often interact with cloud data


Oracle Architecture
• Understanding oracle architecture
is essential to manage a database.
– Troubleshooting
– Recovery
– Tuning, …
• The difference between a
successful DBA administrator and
an ordinary one is understanding
the oracle database architecture.
Overview Of Oracle Architecture

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)

• Part of Oracle Instance.


– Everything is a cache...!
– Volatile storage (memory) faster
than non-volatile storage (disk).
– SGA is a System or Shared Global
Area.
– Shared memory.
System Global Area (SGA)

• Database Buffer Cache


– Blocks read into buffer.
– Users require the same data at
times.
– Keeps data in cache based on the
LRU.
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)

• Streams / Java Pools


– Stream Pool – Support oracle
stream.
– Java Pool – can be used to
instantiate Java objects.
Database Architecture
Database Architecture: Core
Datafiles
• Datafiles align with the database
portion of RDBMS.
• Transient data vs persistent data.
• Some data files map to a table
space – logical name for physical
files.
• Datafile: = C:\oradata\orcl\
data01.dbf
• Tablespace = data.
Database Architecture: Core
Datafiles
• Control File
– Most important file in Oracle (The
BRAIN).
– Information on the state of the
database.
– System change number – SCN.
– Multiplexing.
Database Architecture: Core
Datafiles
• Redo Log File – “Online Log”
– Records database changes.
– Used to “Roll forward” a database
from backup.
– Can be overwritten.
– Duplexing.
Database Architecture: Core
Datafiles
• Archive Log File – “Offline Log”
– Archive Log Mode – Full
recoverability.
– Redo Logs written to archive Logs.
Database Architecture: Core
Datafiles
• System tablespace Or system
data file.
– HEART of the database.
– Contains data dictionary.
– Data file number ONE.
Database Architecture: Core
Datafiles
• SysAux tablespace Or sysAux
data file
– Automatic Workload Repository
(AWR).
– Second data dictionary.
– Performs metrics.
Database Architecture: Core
Datafiles
• Temporary data files (tempfiles)
– Stored data segments that overflow
from PGA.
– Also stores temporary tables.
Database Architecture: Core
Datafiles
• Undo data files
– Anatomy of a transaction.
– Before-images of data.
Database Architecture: Core
Datafiles
• Non – specialized datafiles
– Hold application data in the form of
tables.
– Maximum size is 4,194,304 times
the size of the database block.
• If the block size is 8 K, then the
maximum size is: 8 * 4,194,304 = 32
GB.
Data Dictionary & V$ views
• Data Dictionary Views
– (DBA_, User_, All_)
– Owned by SYS
– Stored in system tablespace (necessary)
• Dynamic Performance Views
– (V$)
– Derived from memory and control file
– Used to monitor and tune database
Pfile vs. SPfile
Pfile SPfile
• static text parameter • Binary server
file parameter file
• init<sid>.ora (<sid> • Persistent across shut
= database name) down and start up
Configuring Oracle DBMS
• Determine initial settings for initialization
parameter file (InitSID.ora example: InitXE.ora)
and file management method (manual or OMF)
• Alter System Set undo_tablespace = UNDO2 Scope =
Both
– Scope = Memory – changes the parameter value only in
currently running instance
– Scope = SPFILE – changes parameter value in SPFile only
(change on next instance startup)
– Scope Both – changes parameter value in both memory and
SPFile
• Startup Precedence (Oracle will not start if the
initialization file is not found)
– spfileSID.ora, spfile.ora, initiSID.ora
Task #: Revies Oracle Architecture
–Documentation
• https://docs.oracle.com/en/datab
ase/oracle/oracle-database/19/ad
ministration.html

• Esp. Oracle Database Concepts


Task #2: Oracle Architecture –Part
1
• Peter Cassidy’s Oracle architecture Part I

– What are the 3 major pieces of any database?


– What are contained in the Datafiles?
– Name 1 data dictionary view (DBA_)with
information about datafiles.
– Name 2 Dynamic Performance (V$) views
associated with datafiles.
– What is contained in the Control files?
– Name a V$ view associated with the Control
file.
Task #3: Oracle Architecture –Part
2
• Peter Cassidy’s Oracle architecture Part 2
– What is contained in the Redo log files?
– How many redo log groups are required by Oracle?
– What is the recommendation for multiplexing redo
log files?
– What happens when the first group of redo log
groups fills?
– What are redo log groups used for?
– Name an initialization parameter associated with
the control file.
– What are the 3 physical components of the Oracle
database?
Task #4: Oracle Architecture –Part
3
• Peter Cassidy’s Oracle Architecture
Part 3
– What are the components of the SGA?
– Name two initialization parameters
associated with the SGA.
– What are the components of the Shared
pool and the purpose of each?
Task #5: Oracle Architecture –Part
4
• Peter Cassidy’s Oracle architecture -
Part 4
– Name the five background processes
Connection to database
• User Process
– Created when application requests a connection to
the database
• Server Process
– Interacts with user process to deal with request
• Methods of connecting processes
– Dedicated server
• One user process to one server process (typical when DB
created during installation)
– Shared server
• Multiple server processes are shared with multiple
connections and controlled using a dispatcher
• Best for OLTP
Server Processes on a Shared Service
Oracle’s OFA (Optimal Flexible
Architecture)
• Best practices for file names and locations
– spreading I/O functions across separate devices
– Improving performance by separating products into
distinct directories that can be located on separate
devices to reduce bottlenecks
– Speeding up administrative tasks, such as backups,
by using naming standards for file types
– Improving detection and prevention of
fragmentation in data files by using naming
standards that quickly identify which tablespace
and datafile are related
• https://docs.oracle.com/en/database/oracle/oracl
e-database/19/ntdbi/optimal-flexible-architectur
e.html
Task #6 - Instance Startup &
Shutdown
• Database startup cannot occur
without a Control File
• Be prepared for questions like:
– From Shutdown, what are the 3 states a
database goes through during startup
and which state is the default?
– What are the 4 shutdown modes?
– Which database shutdown mode
requires instance recovery?
Starting up an Instance
• Starting Instance
– Start SQL*Plus: sqlplus / nolog
– Connect SYS/password@DBnn as SYSDBA
STARTUP MOUNT PFILE='C:\oracle\product\11.2.0
0\admin\db01\pfile\initdb01.ora’;
ALTER DATBASE OPEN;

– 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?

You might also like