Oracle Database Administration I Oracle Server Architecture
Oracle Database Administration I Oracle Server Architecture
Retrieve data
File I/O
Space Management
Change Management
Access Management
Database Structure
Data file(s)
Control file(s)
Redo logs
Init.ora (spfile.ora - 9i)
Trace
Alert log
Password
Instance Structure
Memory structures are allocated
Collectively known as System Global Area.
95% defined by data block buffer cache,
Shared SQL Pool, Large Pool and Java Pool.
Oracle background processes are started.
Single database accessible by multiple
instances - RAC (Real Application Cluster)
a.k.a. parallel server
Instance Defined
Defined by initialization parameter(s)
that determine the size and composition
Can be dynamically altered
initSID.ora (ascii file)
spfileSID.ora (binary file)
configSID.ora (usually only used to
create a database – not widely used)
Oracle Instance
Composed of:
SGA (System Global Area)
PGA (Program Global Area)
Oracle BACKGROUND processes
System Global Area (SGA)
Shared memory region allocated by
Oracle for an Oracle database
Allocated when the Oracle database is
started
The SGA should be in non-paged, non-
swapped memory
SGA Composition
Buffer cache
Shared SQL Pool
Large pool (optional)
Java pool
Redo log buffer
Dictionary cache
Other miscellaneous items
PGA Composition
Non-shared memory area to which a
process (server or background) can write
Allocated by Oracle when a user
connects to an Oracle database and a
session is created
Oracle Instance
Required Background Processes:
DBWn
LGWR
SMON
PMON
CKPT (9i)
Oracle Instance
Optional Background Processes:
(not all inclusive)
ARCn
CKPT (prior to 9i)
RECO
Lock (LCK0)
Job Queue (SNPn)
Queue Monitor (QMNn)
Dispatcher (Dnnn)
Server (Snnn – for dedicated MTS servers)
Oracle Instance
More Details
SGA
Buffer Cache
Redo Log BUFFER
Shared SQL Pool
Dynamic (as of Oracle 9i)
Dynamic SGA
Defined in Granules
SGA < 128mb 4mb size
SGA > 128mb 16mb size
Can be modified on the fly (9i)
Establish an overall maximum
Initially allocated – 4 for small, 3 for
large (fixed SGA, buffer cache, Shared
pool)
Data Buffer Cache Structure
Can be defined in two ways:
* By block db_block_buffers
** By byte db_cache_size
Private SQL
* Each session has one
* Persistent and Runtime areas
* Cursors
Library Cache
PL/SQL Program Units
* Procedures, functions, Packages,
anonymous blocks and database triggers
Allocation and Reuse of Memory
* Every SQL statement submitted, Oracle
automatically allocates memory
* Checks for existence
* Allocate private SQL area
* May flush the shared pool
PGA
PGA
Varies depending if dedicated or Shared
servers (MTS) are used
Stack space
Session information (PGA verses Shared
Pool)
Memory allocated to hold a session’s
variables and arrays
Automatically managed in 9i with the
SQL memory management
Questions
What is the name of Oracle’s memory
structure?
What are its contents?
How is it divided?
If I have 150 mb SGA, why does Oracle
change the size?
Can you vary sizes of Oracle blocks? If
so, how?
Oracle Database
Composed of two structures:
Physical (Operating System view)
Logical (Oracle’s view)
Physical View
Files
Physical Structure
Made up of:
Data files
Redo Log Files – two or more with
members
One or more Control Files
One Parameter File
Trace and alert log files
One Password file
Datafile
Disk space for a tablespace
One or more per tablespace
Associated with only one tablespace
Consists of segments:
* UNDO, Temporary, Data, index, undo,
Object(s)