Professional Documents
Culture Documents
Oracle DB
Oracle DB
DATABASE
AN INTRODUCTION
ARCHITECTURAL OVERVIEW
1 Before starting
INSTANCE MANAGEMENT
2 What we did, what we do
Contents 3
ORACLE NETWORKING
Our amazing products
ORACLE STORAGE
4 Our awesome ideas
ORACLE SECURITY
5 Marketing data and our estimation
2
Oracle Database
vs
Oracle Instance
A database is collection of physical operating
system files on disk.
Ex: data files, temporary files, redo log files, and
control files.
3
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Oracle Database
vs
Oracle Instance
A database is collection of physical operating
system files on disk.
Ex: data files, temporary files, redo log files, and
control files.
An instance can mount and open only a single database, ever.
A database may be mounted and opened by one or more instances
An instance is a set of background processes and
(using RAC).
shared memory structures.
Ex: PMON, DBWn, LGWR, Buffer Cache, Log
Buffer.
4
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Client-Server Processing (two-tier)
Id vis regione gubergren complectitur, vel legere integre corpora ea. Eu error expetenda gubergren eos, eu discere
mentitum vel, ei rebum molestie scaevola pri. Nec id agam iisque commune. Duo at facilisi maluisset, aeque
iuvaret nam at. Sed an vide populo, an nostro accusam fastidii cum, tale purto duo in. Nam ad case assum
dissentiet, ullum labitur ius ea.
5
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
ORACLE
ARCHITECTURE
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Ex labitur deserunt recusabo has,
sensibus erroribus vim eu, cum errem
phaedrum prodesset at. Alii petentium no
INSTANCE MEMORY mea, sale senserit constituto pro at. Ius DATABASE STORAGE
STRUCTURES etiam numquam ad, sed id odio fabulas STRUCTURES
eleifend.
7
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
SGA (Shared Global Area)
Key mandatory memory structures:
The database buffer cache
The log buffer
The shared pool
It may optionally contain:
A large pool
A Java Pool
A Streams Pool
Related parameters:
MEMORY_TARGET
MEMORY_MAX_TARGET
SGA_TARGET
8
SGA_MAX_SIZE
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Database Buffer Cache
9
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Database Buffer Cache
Types of Buffers
Dirty Buffers contain data that has been modified but has
not yet been written to disk;
Pinned Buffers are currently being accessed;
Free Buffers do not contain any useful data and are
available for use.
10
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Redo Log Buffer
Key mandatory memory structures:
The database buffer cache
The log buffer
The shared pool
It may optionally contain:
A large pool
A Java Pool
A Streams Pool
Related parameters:
MEMORY_TARGET
MEMORY_MAX_TARGET
SGA_TARGET
11
SGA_MAX_SIZE
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
What is a
Chenge Vector like?
12
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Redo Log Buffer
13
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Redo Log Buffer
14
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Redo Log Buffer
Ultimate Bottleneck
15
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Shared Pool
Used for caching many different types of frequently
used data.
16
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Library Cache
17
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Library Cache
Ready to Execute
18
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Stages of SQL Processing
https://docs.oracle.com/database/121/TGSQL/tgsql_sqlpro
c.htm#TGSQL176
19
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Library Cache Check
Id vis regione gubergren complectitur, vel legere integre corpora ea. Eu error expetenda gubergren eos, eu discere
mentitum vel, ei rebum molestie scaevola pri. Nec id agam iisque commune. Duo at facilisi maluisset, aeque
iuvaret nam at. Sed an vide populo, an nostro accusam fastidii cum, tale purto duo in. Nam ad case assum
dissentiet, ullum labitur ius ea.
20
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Data Dictionary Cache
The data dictionary cache stores descriptive information, or metadata, about schema objects. Oracle Database uses
this metadata when parsing SQL statements or during the compilation of PL/SQL programs.
21
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Server Result Cache
The server result cache is a memory pool consists of the SQL query result cache, which stores results of SQL queries,
and the PL/SQL function result cache, which stores values returned by PL/SQL functions.
22
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Server Result Cache
The server result cache is a memory pool consists of the SQL query result cache, which stores results of SQL queries,
and the PL/SQL function result cache, which stores values returned by PL/SQL functions.
23
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
How Results are
Retrieved in a Query
24
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
A portion of the
execution plan
The results are retrieved directly from the result cache, as indicated in
step 1 of the execution plan. The value in the Name column is the
cache ID of the result.
25
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
A query for result
cache statistics
26
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
The output of a
result cache
statistics
27
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Reserved Pool
The reserved pool is a memory area in the shared pool that Oracle Database can use to allocate large contiguous
chunks of memory (usually over 5 KB).
28
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
What is a latch?
29
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Reserved Pool
Large allocations
31
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Shared Server
vs
Dedicated Server Processes
32
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
ECM Overview
Workflow Solutions
ECM Market
Patent Explanation
Types of Processes
1. Client Process:
A client program acting on behalf of the user, such as
Oracle Enterprise Manager, SQL*Plus, or an application
2. Oracle Processes:
Server Process: Performs much of the work
based on a client request. Such as parsing and running
SQL statements, and retrieving and returning results
to the client program.
:Background Processes: Starts with the
database instance and perform maintenance tasks
34
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
SMON (System Monitor)
Initially has the task of mounting and opening database
OPEN
35
The Power of PowerPoint - thepopp.com
SMON (System Monitor)
Housekeeping tasks
http://www.dbacentre.com/smons-instance-recovery-with-
example/
37
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
PMON (Process Monitor)
PMON monitors the other background processes and performs process recovery when a server or dispatcher process
terminates abnormally.
38
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
DBWn (Database Writer)
Lazy Writer
• DBWn writes dirty buffers from the databaase buffer cache to the
datafiles on disk.
• Although one database writer process (DBW0) is adequate for
most systems, you can configure additional processes (DBW1,
DBW2,...,DBW19)
39
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
DBWn (Database Writer)
Write Conditions
• No free buffers
• Too many dirty buffers
• 3 seconds timeout
• A checkpoint requested
Note: DBWn does absolutely nothing when a transaction is
committed!
40
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
What is a checkpoint?
41
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
LGWR (Log Writer)
LGWR writes the contents of the redo log buffer to the online log files
on disk. In the following circumstances, LGWR writes all redo
entries:
• A user commits a transaction.
• Three seconds have passed since LGWR last wrote.
42
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
LGWR (Log Writer)
43
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
ARCn (Archiver)
• ARC process copies change vectors from inactive online redo log
files to an offline storage.
44
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
CKPT (Checkpoint)
Consistent Database
CKPT updates the control file and data file headers with checkpoint
information and signals DBW to write blocks to disk. Checkpoint
information includes the checkpoint position, SCN, and location in
online redo log to begin recovery.
45
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
MMON and MMNL
(Manageability Monitors)
Automatic Management
46
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
ECM Overview
Workflow Solutions
ECM Market
Patent Explanation
Physical Database Logical Database
Structures Structures
The physical database structures of an Oracle The physical database structures of an Oracle
database are viewable at the operating system database are viewable at the operating system
level. level.
48
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Physical Database Structures
• Data Files
• Control Files
• Online Redo Log Files
• Archieved Redo Log Files
• Instance parameter file
• Password File
• Alert Log and Trace Files 49
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Data Files Structure
Data Repos
50
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Control Files
51
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Control Files
Used everywhere
52
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Control Files
53
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Online Redo Log Files
Log Switches
55
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Logical Database Structures
Not OS Files
• Datablock
• Extent
• Segment
• Tablespaces
56
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Data Blocks
Block Overhead
Actual Data
59
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Data Block Format
Free Space
60
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Extents
61
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Segments
Types
• User segments
• Temporary segments
• Undo segments
62
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Tablespaces
Storage Containers
63
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security
Tablespaces
Usage Areas
Usage Areas
65
The Power of PowerPoint - thepopp.com
Architectural Overvıew Instance Management Oracle Networking Oracle Storage Oracle Security