less01 dba1 new
TRANSCRIPT
-
8/2/2019 Less01 DBA1 New
1/25
Copyright 2007, Oracle. All rights reserved.
Exploring the Oracle Database Architecture
-
8/2/2019 Less01 DBA1 New
2/25
Copyright 2007, Oracle. All rights reserved.1 - 2
Objectives
After completing this lesson, you should be able to: List the major architectural components of Oracle
Database
Explain the memory structures
Describe the background processes Correlate the logical and physical storage structures
-
8/2/2019 Less01 DBA1 New
3/25
Copyright 2007, Oracle. All rights reserved.1 - 3
Oracle Database
The Oracle relational database management system(RDBMS) provides an open, comprehensive, integratedapproach to information management
-
8/2/2019 Less01 DBA1 New
4/25
Copyright 2007, Oracle. All rights reserved.1 - 4
Connecting to a Server
Client Middle tier Server
Multitier architecture shown
-
8/2/2019 Less01 DBA1 New
5/25
Copyright 2007, Oracle. All rights reserved.1 - 6
Database
Data filesOnline redo
log files
Controlfiles
Oracle Database Architecture: Overview
Databasebuffercache
Shared pool
Data dictionary
cache
Librarycache
PMONSMON Others
Serverprocess
PGA
Archivedlog files
Userprocess
Instance
RECO
ARCn
SGA
DBWn
Redo logbuffer
LGWRCKPT
-
8/2/2019 Less01 DBA1 New
6/25
Copyright 2007, Oracle. All rights reserved.1 - 7
Connecting to the Database
Connection: Communication between a user processand an instance
Session: Specific connection of a user to an instancethrough a user process
SQL> Select
Session
Connection
User
User
process
Server
process
Session
-
8/2/2019 Less01 DBA1 New
7/25Copyright 2007, Oracle. All rights reserved.1 - 8
Interacting with an Oracle Database
User
Databasebuffercache
Shared pool
Data dictionarycache
Librarycache
PMONSMON Others
Instance
RECOARCn
SGA
DBWn
Redo logbuffer
LGWRCKPT
Userprocess Serverprocess
-
8/2/2019 Less01 DBA1 New
8/25Copyright 2007, Oracle. All rights reserved.1 - 10
Database
Oracle Database Server Structures
PMONSMON Others
Data filesOnline redo
log filesControl
files
Instance
RECOARCnDBWn LGWRCKPT
Storage structures
Userprocess
Serverprocess
Memory structures
Processes
Databasebuffercache
Shared pool
Data dictionarycache
Librarycache
SGA
Redo logbuffer
-
8/2/2019 Less01 DBA1 New
9/25Copyright 2007, Oracle. All rights reserved.1 - 11
Database Buffer Cache
Is part of the SGA Holds copies of data blocks that are read from data files
Is shared by all concurrent users
PMONSMON Others
Instance
RECOARCnDBWn LGWRCKPT
Database
buffercache
Shared pool
Data dictionarycache
Librarycache
SGA
Redo log
buffer
-
8/2/2019 Less01 DBA1 New
10/25Copyright 2007, Oracle. All rights reserved.1 - 12
Shared Pool
Is a portion of the SGA Contains:
Library cache
Shared SQL area
Data dictionary cache Control structures
PMONSMON Others
Instance
RECOARCnDBWn LGWRCKPT
SharedSQL area
Librarycache
Data dictionarycache
Other
Databasebuffercache
Shared pool
Data dictionarycache
Library
cache
SGA
Redo logbuffer
-
8/2/2019 Less01 DBA1 New
11/25Copyright 2007, Oracle. All rights reserved.1 - 14
Database Writer Process (DBWn)
Writes modified (dirty) buffers in the database buffer cacheto disk:
Asynchronously while performing other processing
Periodically to advance the checkpoint
Database buffercache
Database writerprocess
Data files
DBWn
-
8/2/2019 Less01 DBA1 New
12/25Copyright 2007, Oracle. All rights reserved.1 - 16
LogWriter Process (LGWR)
Writes the redo log buffer to a redo log file on disk Writes:
When a user process commits a transaction
When the redo log buffer is one-third full
Before a DBWnprocess writes modified buffers to disk
Redo log buffer LogWriter process Redo log files
LGWR
-
8/2/2019 Less01 DBA1 New
13/25Copyright 2007, Oracle. All rights reserved.1 - 18
Checkpoint Process (CKPT)
Records checkpoint information in Control file
Each data file header
Checkpointprocess
Data files
Control fileCKPT
-
8/2/2019 Less01 DBA1 New
14/25Copyright 2007, Oracle. All rights reserved.1 - 19
System Monitor Process (SMON)
Performs recovery at instance startup Cleans up unused temporary segments
Instance
Temporarysegment
System Monitorprocess
SMON
-
8/2/2019 Less01 DBA1 New
15/25Copyright 2007, Oracle. All rights reserved.1 - 20
Process Monitor Process (PMON)
Performs process recovery when a user process fails Cleans up the database buffer cache
Frees resources that are used by the user process
Monitors sessions for idle session timeout
Dynamically registers database services with listeners
Process Monitorprocess
Database buffercache
Failed userprocess
UserPMON
-
8/2/2019 Less01 DBA1 New
16/25Copyright 2007, Oracle. All rights reserved.1 - 21
Archiver Processes (ARCn)
Copy redo log files to a designated storage device aftera log switch has occurred
Can collect transaction redo data and transmit that datato standby destinations
Archiver process Archive destinationCopies of redo logfiles
ARCn
-
8/2/2019 Less01 DBA1 New
17/25Copyright 2007, Oracle. All rights reserved.1 - 22
Other Processes
MMON: Performs manageability-related backgroundtasks
MMNL: Performs frequent and lightweightmanageability-related tasks
MMAN: Performs automatic memory management tasks CJQ0: Runs user jobs used in batch processing
QMNx: Monitors the Streams Advanced Queuingmessage queues
-
8/2/2019 Less01 DBA1 New
18/25Copyright 2007, Oracle. All rights reserved.1 - 24
Database Storage Architecture
Online redo log files
Password file
Parameter file Archived redo log
files
Control files Data files
Alert log and trace files
Backup files
DB structures- Memory- ProcessStorage
-
8/2/2019 Less01 DBA1 New
19/25Copyright 2007, Oracle. All rights reserved.1 - 26
Logical and Physical Database Structures
Database
Logical Physical
Tablespace Data file
OS block
Segment
Extent
Oracle datablock
Schema
-
8/2/2019 Less01 DBA1 New
20/25Copyright 2007, Oracle. All rights reserved.1 - 28
Tablespaces and Data Files
Tablespaces consist of one or more data files. Data files belong to only one tablespace.
USERS tablespace
Data file 1 Data file 2
-
8/2/2019 Less01 DBA1 New
21/25Copyright 2007, Oracle. All rights reserved.1 - 29
SYSTEMand SYSAUX Tablespaces
The SYSTEMand SYSAUX tablespaces are mandatorytablespaces that are created at the time of databasecreation. They must be online.
The SYSTEMtablespace is used for core functionality
(for example, data dictionary tables).
The auxiliary SYSAUX tablespace is used for additional
database components (such as the Enterprise ManagerRepository).
-
8/2/2019 Less01 DBA1 New
22/25Copyright 2007, Oracle. All rights reserved.1 - 30
Segments, Extents, and Blocks
Segments exist in a tablespace. Segments are collections of extents.
Extents are collections of data blocks.
Data blocks are mapped to disk blocks.
Segment Extents Datablocks
Diskblocks
-
8/2/2019 Less01 DBA1 New
23/25Copyright 2007, Oracle. All rights reserved.1 - 31
Database Architecture:Summary of Structural Components
Memory structures: System Global Area (SGA): Database buffer cache, redo
buffer, and various pools
Program Global Area (PGA)
Process structures:
User process and server process
Background processes: SMON, PMON, DBWn, CKPT,LGWR, ARCn, and so on
Storage structures:
Logical: Database, schema, tablespace, segment, extent,and Oracle block
Physical: Data files, control files, and redo log files
-
8/2/2019 Less01 DBA1 New
24/25Copyright 2007, Oracle. All rights reserved.1 - 32
Summary
In this lesson, you should have learned how to: List the major architectural components of Oracle
Database
Explain the memory structures
Describe the background processes Correlate the logical and physical storage structures
-
8/2/2019 Less01 DBA1 New
25/25
Practice 1: Overview
This is a paper practice with questions about: Database architecture
Memory
Processes
File structures