Вы находитесь на странице: 1из 33

Exploring the Oracle Database Architecture

Copyright 2009, Oracle. All rights reserved.

Objectives
After completing this lesson, you should e a le to! " #ist the ma$or architectural components of Oracle %ata ase " &'plain the memory structures " %escri e the ac(ground processes " Correlate the logical and physical storage structures " %escri e A)* storage components

1-2

Copyright 2009, Oracle. All rights reserved.

Oracle Database
,he Oracle relational data ase management system -.%/*)0 provides an open, comprehensive, integrated approach to information management

1-+

Copyright 2009, Oracle. All rights reserved.

Connecting to a Server

Client

Middle tier

Server

Multitier architecture shown


1-1 Copyright 2009, Oracle. All rights reserved.

Oracle Database Server Architecture: Overview


#nstance
!A Server process

Me$or% Structures (S%ste$ !lobal Area) Server

rocess Structures

"ser process

Database (Storage Structures) Client


1-2 Copyright 2009, Oracle. All rights reserved.

#nstance: Database Con&igurations


*onclustered S%ste$ Clustered S%ste$

#' #(

#'

#(

#)

D' D( +ocal Storage D Shared Storage

1-3

Copyright 2009, Oracle. All rights reserved.

Connecting to the Database #nstance


" " Connection! Communication et5een a user process and an instance )ession! )pecific connection of a user to an instance through a user process

"ser

SQL> Select

"ser process

Server process

Session

Connection Session

1-4

Copyright 2009, Oracle. All rights reserved.

Oracle Database Me$or% Structures


rogra$ !lobal Area ( !A)
Stac. Space Server process ' "ser !lobal Area Server process (

!A
Stac. Space "ser !lobal Area

Shared pool

Database bu&&er cache

,edo log bu&&er

/EE bu&&er pool ,EC0C+E bu&&er pool n/ bu&&er cache

+arge pool

-ava pool

Strea$s pool

S%ste$ !lobal Area (S!A)


1-6 Copyright 2009, Oracle. All rights reserved.

Shared ool
" " 7s a portion of the )8A Contains!
9 #i rary cache
:

)hared );# area

Shared S1+ area

Data dictionar% cache 2ixed Area

9 %ata dictionary cache 9 Control structures


Database bu&&er cache

Shared pool

+ibrar% Other cache /EE bu&&er pool ,edo log bu&&er ,EC0C+E bu&&er pool Strea$s pool n/ bu&&er cache

+arge pool

-ava pool

S%ste$ !lobal Area (S!A)


1-9 Copyright 2009, Oracle. All rights reserved.

Database 3u&&er Cache


" " " 7s part of the )8A <olds copies of data loc(s that are read from data files 7s shared y all concurrent users

Shared pool

Database bu&&er cache

,edo log bu&&er

/EE bu&&er pool ,EC0C+E bu&&er pool n/ bu&&er cache

+arge pool

-ava pool

Strea$s pool

S%ste$ !lobal Area (S!A)


1 - 10 Copyright 2009, Oracle. All rights reserved.

,edo +og 3u&&er


" " " 7s a circular uffer in the )8A <olds information a out changes made to the data ase Contains redo entries that have the information to redo changes made y operations such as %*# and %%#

Shared pool

Database bu&&er cache

,edo log bu&&er

/EE bu&&er pool ,EC0C+E bu&&er pool n/ bu&&er cache

+arge pool

-ava pool

Strea$s pool

S%ste$ !lobal Area (S!A)


1 - 11 Copyright 2009, Oracle. All rights reserved.

+arge ool
=rovides large memory allocations for! " )ession memory for the shared server and the Oracle >A interface " 7?O server processes " Oracle %ata ase ac(up and restore operations
/EE bu&&er pool 2ree arallel #4O bu&&er ,EC0C+E$e$or% 1uer% bu&&er pool ,esponse ,e5uest Advanced 5ueue n/ bu&&er 5ueue 1ueuing cache +arge pool

Shared pool

Database bu&&er cache

,edo log bu&&er

+arge pool

-ava pool

Strea$s pool

S%ste$ !lobal Area (S!A)


1 - 12 Copyright 2009, Oracle. All rights reserved.

-ava ool and Strea$s ool


" " @ava pool memory is used to store all session-specific @ava code and data in the @A*. )treams pool memory is used e'clusively y Oracle )treams to!
9 9 )tore uffered Bueue messages =rovide memory for Oracle )treams processes
Database bu&&er cache /EE bu&&er pool ,EC0C+E bu&&er pool n/ bu&&er cache Strea$s pool

Shared pool

,edo log bu&&er

+arge pool -ava pool

-ava pool

Strea$s pool

S%ste$ !lobal Area (S!A)


Copyright 2009, Oracle. All rights reserved.

1 - 1+

rogra$ !lobal Area ( !A)


!A
Stac. Space Server process ' "ser !lobal Area Cursor State "ser Session Data Sort Area 6ash Area

Create 3it$ap Area 3it$ap Merge Area

S1+ 7or.ing Areas


Database bu&&er cache /EE bu&&er pool ,EC0C+E bu&&er pool n/ bu&&er cache

Shared pool

,edo log bu&&er

+arge pool

-ava pool

Strea$s pool

S%ste$ !lobal Area (S!A)


1 - 11 Copyright 2009, Oracle. All rights reserved.

rocess Architecture
" Cser process
9 7s the application or tool that connects to the Oracle data ase

"

%ata ase processes


9 )erver process! Connects to the Oracle instance and is started 5hen a user esta lishes a session 9 /ac(ground processes! Are started 5hen an Oracle instance is started

"

%aemon ? Application processes


9 Det5or(ing listeners 9 8rid infrastructure daemons

1 - 12

Copyright 2009, Oracle. All rights reserved.

rocess Structures
#nstances (ASM and Database separate) S%ste$ !lobal Area (S!A) !A
Server process

3ac.ground processes ,e5uired: Optional:


D37n A,Cn C/ 8 ASM3 +!7, ,3A+ SMO* Others MO* ,ECO

+istener

!rid #n&rastructure rocesses (ASM and Oracle ,estart)


"ser process ohas orarootagent ocssd oraagent dis.$on cssdagent

1 - 13

Copyright 2009, Oracle. All rights reserved.

Database 7riter rocess (D37n)


Erites modified -dirty0 uffers in the data ase uffer cache to dis(! " Asynchronously 5hile performing other processing " ,o advance the chec(point

D37n Database bu&&er cache Database writer process Data &iles

1 - 14

Copyright 2009, Oracle. All rights reserved.

+og 7riter rocess (+!7,)


" " Erites the redo log uffer to a redo log file on dis( Erites!
9 9 9 9 Ehen a user process commits a transaction Ehen the redo log uffer is one-third full /efore a %/En process 5rites modified uffers to dis( &very + seconds

+!7, ,edo log bu&&er +og 7riter process ,edo log &iles

1 - 16

Copyright 2009, Oracle. All rights reserved.

Chec.point rocess (C/ 8)


" .ecords chec(point information in
9 Control file 9 &ach data file header

C/ 8
Chec.point process

Control &ile

Data &iles

1 - 19

Copyright 2009, Oracle. All rights reserved.

S%ste$ Monitor rocess (SMO*)


" " =erforms recovery at instance startup Cleans up unused temporary segments

SMO*
S%ste$ Monitor process

#nstance

8e$porar% seg$ent

1 - 20

Copyright 2009, Oracle. All rights reserved.

rocess Monitor rocess ( MO*)


" =erforms process recovery 5hen a user process fails
9 Cleans up the data ase uffer cache 9 Frees resources that are used y the user process

" "

*onitors sessions for idle session timeout %ynamically registers data ase services 5ith listeners

Server process

MO* "ser
2ailed user process rocess Monitor process

tnslsnr

Database bu&&er cache

1 - 21

Copyright 2009, Oracle. All rights reserved.

,ecoverer rocess
" " " " Csed 5ith the distri uted data ase configuration Automatically connects to other data ases involved in in-dou t distri uted transactions Automatically resolves all in-dou t transactions .emoves any ro5s that correspond to in-dou t transactions

,ECO
,ecoverer process in database A #n9doubt transaction in database 3

1 - 22

Copyright 2009, Oracle. All rights reserved.

Archiver rocesses (A,Cn)


" " Copy redo log files to a designated storage device after a log s5itch has occurred Can collect transaction redo data and transmit that data to stand y destinations

A,Cn

Archiver process

Copies o& redo log &iles

Archive destination

1 - 2+

Copyright 2009, Oracle. All rights reserved.

rocess Startup Se5uence


"
Oracle 8rid 7nfrastructure is started y the O) init daemon.

Operating S%ste$ !rid #n&rastructure !rid #n&rastructure #nit Dae$on 7rapper Script Dae$ons and rocesses init init:ohasd (root) ohasd:bin oraagent:bin orarootagent:bin dis.$on:bin cssdagent ocssd:bin ASM #nstance +istener D3 #nstance "ser De&ined Applications

"

Oracle 8rid 7nfrastructure installation modifies the /etc/inittab file to ensure startup every time machine is started in corresponding run level.
# cat /etc/inittab .. h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2> 1 !/dev/null

1 - 21

Copyright 2009, Oracle. All rights reserved.

Database Storage Architecture

Control &iles

Data &iles

Online redo log &iles

ara$eter &ile

3ac.up &iles

Archived redo log &iles

assword &ile
1 - 22

Alert log and trace &iles


Copyright 2009, Oracle. All rights reserved.

+ogical and h%sical Database Structures


+ogical Database h%sical

8ablespace

Data &ile

Seg$ent Storage S%ste$ Extent " SA* " *AS " *2S " ASM

Oracle data bloc.

" Exadata " ,A7 " 2ile S%ste$

1 - 23

Copyright 2009, Oracle. All rights reserved.

Seg$ents; Extents; and 3loc.s


" " " " )egments e'ist in a ta lespace. )egments are collections of e'tents. &'tents are collections of data loc(s. %ata loc(s are mapped to dis( loc(s.

Seg$ent

Extents

Data bloc.s

Dis. bloc.s (2ile S%ste$ Storage)

1 - 24

Copyright 2009, Oracle. All rights reserved.

8ablespaces and Data 2iles


8ablespace ' Data&ile '
</b </b </b </b </b </b </b </b

8ablespace ( (3ig&ile) Data&ile (


</b </b </b </b </b </b </b </b </b </b </b </b

Data&ile )

Onl% ' data&ile allowed AB '(< 83

Extent
=>/3

Extent
?=/3

Seg$ent
'=@/3

1 - 26

Copyright 2009, Oracle. All rights reserved.

S"S#$% and S"S&'( 8ablespaces


"
,he SYSTEM and SYSAUX ta lespaces are mandatory ta lespaces that are created at the time of data ase creation. ,hey must e online. ,he SYSTEM ta lespace is used for core functionality -for e'ample, data dictionary ta les0. ,he au'iliary SYSAUX ta lespace is used for additional data ase components -such as the &nterprise *anager .epository0. ,he SYSTEM and SYSAUX ta lespaces are not recommended to e used to store applicationGs data.

" "

"

1 - 29

Copyright 2009, Oracle. All rights reserved.

Auto$atic Storage Manage$ent


" " " " " "
7s a porta le and high-performance cluster file system *anages Oracle data ase files *anages application files 5ith A)* Cluster File )ystem -ACF)0 )preads data across dis(s to alance load *irrors data in case of failures )olves storage-management challenges

Application

Oracle Database

ASM Cluster 2ile S%ste$ ASM D%na$ic Colu$e Manager

ASM 2iles &or Oracle Database

Auto$atic Storage Manage$ent

Operating s%ste$

1 - +0

Copyright 2009, Oracle. All rights reserved.

ASM Storage Co$ponents


ASM Oracle Database data&ile ASM &ile ASM dis. group

ASM extent 2ile s%ste$ or ,aw device

ASM allocation unit

ASM dis.

1 - +1

Copyright 2009, Oracle. All rights reserved.

#nteracting with an Oracle Database: Me$or%; rocesses and Storage


#nstance Database bu&&er cache -ava pool
+!7, SMO*

!A
Server process

Shared pool

,edo log bu&&er

/EE bu&&er ,EC0C+E bu&&er n/ bu&&er cache


A,Cn Others

+arge pool
+istener D37n C/ 8

Strea$s pool
MO* ,ECO

"ser process

"ser

1 - +2

Copyright 2009, Oracle. All rights reserved.

Su$$ar%
7n this lesson, you should have learned ho5 to! " #ist the ma$or architectural components of Oracle %ata ase " &'plain the memory structures " %escri e the ac(ground processes " Correlate the logical and physical storage structures " %escri e the A)* storage components

1 - ++

Copyright 2009, Oracle. All rights reserved.

Вам также может понравиться