Sie sind auf Seite 1von 25

Exploring the Oracle Database Architecture

Copyright 2007, Oracle. All rights reserved.

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

1-2

Copyright 2007, Oracle. All rights reserved.

Oracle Database
The Oracle relational database management system (RDBMS) provides an open, comprehensive, integrated approach to information management

1-3

Copyright 2007, Oracle. All rights reserved.

Connecting to a Server

Client

Middle tier

Server

Multitier architecture shown

1-4

Copyright 2007, Oracle. All rights reserved.

Oracle Database Architecture: Overview


Instance
SMON PMON RECO Others

SGA

Shared pool Library cache Data dictionary cache


LGWR ARCn

Database buffer cache PGA Server process


DBWn

Redo log buffer

CKPT

User process Data files

Control files Database

Online redo log files

Archived log files

1-6

Copyright 2007, Oracle. All rights reserved.

Connecting to the Database


Connection: Communication between a user process and an instance Session: Specific connection of a user to an instance through a user process

User

SQL> Select

User process

Server process

Session

Connection Session

1-7

Copyright 2007, Oracle. All rights reserved.

Interacting with an Oracle Database


Instance
User process Server process

SGA

Shared pool Library cache Data dictionary cache


ARCn RECO Others

Database buffer cache

Redo log buffer

DBWn CKPT

LGWR SMON PMON

User

1-8

Copyright 2007, Oracle. All rights reserved.

Oracle Database Server Structures


Memory structures
Instance SGA Shared pool Library cache Data dictionary cache
ARCn RECO Others

User process

Server process

Database buffer cache

Redo log buffer

Processes

DBWn

CKPT

LGWR

SMON

PMON

Database

Storage structures

Data files

Control files

Online redo log files

1 - 10

Copyright 2007, Oracle. All rights reserved.

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

Instance
SGA Shared pool Library cache Data dictionary cache
ARCn RECO Others

Database buffer cache

Redo log buffer

DBWn

CKPT

LGWR SMON

PMON

1 - 11

Copyright 2007, Oracle. All rights reserved.

Shared Pool
Is a portion of the SGA Contains:
Library cache

Shared SQL area

Data dictionary cache Control structures


Instance SGA Shared pool Library cache Data dictionary cache
RECO Others

Shared SQL area

Data dictionary cache

Database buffer cache

Redo log buffer

Library cache

Other

DBWn

CKPT

LGWR

SMON

PMON ARCn

1 - 12

Copyright 2007, Oracle. All rights reserved.

Database Writer Process (DBWn)


Writes modified (dirty) buffers in the database buffer cache to disk: Asynchronously while performing other processing Periodically to advance the checkpoint

DBWn Database buffer cache Database writer process Data files

1 - 14

Copyright 2007, Oracle. All rights reserved.

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 DBWn process writes modified buffers to disk

LGWR Redo log buffer LogWriter process Redo log files

1 - 16

Copyright 2007, Oracle. All rights reserved.

Checkpoint Process (CKPT)


Records checkpoint information in
Control file Each data file header

CKPT
Checkpoint process

Control file

Data files

1 - 18

Copyright 2007, Oracle. All rights reserved.

System Monitor Process (SMON)


Performs recovery at instance startup Cleans up unused temporary segments

SMON
System Monitor process

Instance

Temporary segment

1 - 19

Copyright 2007, Oracle. All rights reserved.

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

PMON
Process Monitor process

User
Failed user process Database buffer cache

1 - 20

Copyright 2007, Oracle. All rights reserved.

Archiver Processes (ARCn)


Copy redo log files to a designated storage device after a log switch has occurred Can collect transaction redo data and transmit that data to standby destinations

ARCn

Archiver process

Copies of redo log files

Archive destination

1 - 21

Copyright 2007, Oracle. All rights reserved.

Other Processes
MMON: Performs manageability-related background tasks MMNL: Performs frequent and lightweight manageability-related tasks MMAN: Performs automatic memory management tasks CJQ0: Runs user jobs used in batch processing QMNx: Monitors the Streams Advanced Queuing message queues

1 - 22

Copyright 2007, Oracle. All rights reserved.

Database Storage Architecture

DB structures - Memory - Process Storage

Control files

Data files

Online redo log files

Parameter file

Backup files

Archived redo log files

Password file
1 - 24

Alert log and trace files


Copyright 2007, Oracle. All rights reserved.

Logical and Physical Database Structures


Logical Database Physical

Schema

Tablespace

Data file

Segment

Extent

Oracle data block

OS block

1 - 26

Copyright 2007, Oracle. All rights reserved.

Tablespaces and Data Files


Tablespaces consist of one or more data files. Data files belong to only one tablespace.

Data file 1

Data file 2

USERS tablespace

1 - 28

Copyright 2007, Oracle. All rights reserved.

SYSTEM and SYSAUX Tablespaces


The SYSTEM and SYSAUX tablespaces are mandatory tablespaces that are created at the time of database creation. They must be online. The SYSTEM tablespace is used for core functionality (for example, data dictionary tables). The auxiliary SYSAUX tablespace is used for additional database components (such as the Enterprise Manager Repository).

1 - 29

Copyright 2007, Oracle. All rights reserved.

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

Data blocks

Disk blocks

1 - 30

Copyright 2007, Oracle. All rights reserved.

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

1 - 31

Copyright 2007, Oracle. All rights reserved.

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

1 - 32

Copyright 2007, Oracle. All rights reserved.

Practice 1: Overview
This is a paper practice with questions about: Database architecture Memory Processes File structures

1 - 33

Copyright 2007, Oracle. All rights reserved.

Das könnte Ihnen auch gefallen