SlideShare a Scribd company logo
ORACLE 11g
ARCHITECTURE - 1
1 1
Major Database Release Number
The first digit is the most general identifier. It represents a major new version of the
software that contains significant new functionality.
Database Maintenance Release Number
The second digit represents a maintenance release level. Some new features may also
be included.
Application Server Release Number
The third digit reflects the release level of the Oracle Application Server (OracleAS).
Component-Specific Release Number
The fourth digit identifies a release level specific to a component. Different
components can have different numbers in this position depending upon, for
example, component patch sets or interim releases.
Platform-Specific Release Number
The fifth digit identifies a platform-specific release. Usually this is a patch set. When
different platforms require the equivalent patch set, this digit will be the same across
the affected platforms.
Identifying Your Oracle Database Software Release
The Relational Model
In his seminal 1970 paper "A Relational Model of Data for Large Shared Data Banks," E.
F. Codd defined a relational model based on mathematical set theory. Today, the most
widely accepted database model is the relational model.
The relational model has the following major aspects:
Structures
Well-defined objects store or access the data of a database.
Operations
Clearly defined actions enable users to manipulate the data and structures of a
database.
Integrity rules
Integrity rules govern operations on the data and structures of a database.
A relational database stores data in a set of simple relations. A relation is a set of
tuples. A tuple is an unordered set of attribute values.
A table is a two-dimensional representation of a relation in the form of rows (tuples)
and columns (attributes). Each row in a table has the same set of columns. A relational
database is a database that stores data in relations (tables). For example, a relational
database could store information about company employees in an employee table, a
department table, and a salary table.
See Also:
http://portal.acm.org/citation.cfm?id=362685 for an abstract and link to Codd's paper
Oracle Database Standard Edition One Oracle Database Standard Edition One delivers
unprecedented ease of use, power, and performance for workgroup, department-level, and
Web applications. From single-server environments for small business to highly distributed
branch environments, Oracle Database Standard Edition One includes all the facilities
necessary to build business-critical applications.
Oracle Database Standard Edition Oracle Database Standard Edition delivers the
unprecedented ease of use, power, and performance of Standard Edition One, with support
for larger machines and clustering of services with Oracle Real Application Clusters (Oracle
RAC). Oracle RAC is not included in the Standard Edition of releases prior to Oracle Database
10g, nor is it an available option with those earlier releases.
Oracle Database Enterprise Edition Oracle Database Enterprise Edition provides the
performance, availability, scalability, and security required for mission-critical applications
such as high-volume online transaction processing (OLTP) applications, query-intensive data
warehouses, and demanding Internet applications. Oracle Database Enterprise Edition
contains all of the components of Oracle Database, and can be further enhanced with the
purchase of the options and packs described in Chapter 2, "Options and Packs".
Oracle Database Express Edition Oracle Database Express Edition (Oracle Database
XE) is an entry-level edition of Oracle Database that is quick to download, simple to
install and manage, and is free to develop, deploy, and distribute. Oracle Database XE
makes it easy to upgrade to the other editions of Oracle without costly and complex
migrations. Oracle Database XE can be installed on any size machine with any number
of CPUs, stores up to 4GB of user data, using up to 1GB of memory, and using only
one CPU on the host machine. Support is provided by an online forum.
Oracle Database Personal Edition Oracle Database Personal Edition supports single-
user development and deployment environments that require full compatibility with
Oracle Database Standard Edition One, Oracle Database Standard Edition, and Oracle
Database Enterprise Edition.
Oracle Architecture I
Objects Logical
Face
Database
Physical
Face
Files O.S
Tables
Views
Synonyms
Culsters
Tablespaces
Procedures
Functions
Etc.
Device Driv
Hardware
Disk
Controlfiles
Data files
Redolog files
Instance
SGA
Oracle 11g Architecture - I
1 1
 Every running Oracle database is associated with
an Oracle instance.
 When a database is started on a database server,
Oracle allocates a memory area called the System
Global Area (SGA), and starts some Oracle
processes called background process (BP).
 This combination of the SGA and the BP is called
an Oracle instance.
INSTANCE
Architecture
1 3
 The Oracle server is an object-relational database
management system that provides and open,
comprehensive, integrated approach to information
management
Oracle Database Users
 Logging Directly from to the host
 Two-tiered (client-server) connection
 Three-tiered connection
Oracle 11g Architecture - I
1 1
An Oracle instance runs two types of processes -
Server and Background. Server processes are created
to handle requests from sessions connected to the
instance. Background processes, as the name says,
are processes running behind the scene and are
meant to perform certain maintenance activities or to
deal with abnormal conditions arising in the lifetime
of the instance.
Architecture
1 3
Not all background processes are mandatory for an
instance. Each background process is meant for a
specific purpose and its role is well defined.
We have two type of BG processes
 Mandatory BG processes
 Optional BG processes
Architecture
Before lass
1 3
 User process Started at the time a database user
requests connection to the Oracle server
 Server process Connects to the Oracle Instance
and is started when a user establishes a session
 Background processes Started when an Oracle
Instance is started
Architecture
1 3
 Background processes are invoked automatically
when the instance is started.
 Maintains and enforces relationships between
physical and memory structures.
 Mandatory background processes:
• DBWn
• PMON
• CKPT
• LGWR
• SMON
• RECO
Background processes
Architecture
1 3
Architecture
Optional Background Processes:
 ARCn
 LMDn
 RECO
 CJQ0
 LMON
 Snnn
 Dnnn
 Pnnn
 LCKn
 QMNn
1 3
Instance
SGA
Background Processes
F Oracle Server consists of an Oracle Instance and an Oracle database.
An Oracle Instance consists of a memory structure called SGA
(System Global Area) and background processes used by an oracle
server to manage a database. An Oracle instance, which is identified by
setting ORACLE_SID at the operating system,can open and use only
one database at any point of time.
An Oracle Instance:
F Is a means to access an
Oracle database
F Always opens one and
only one database
Oracle Instance
Oracle 11g Architecture - II
1 2
Instance
Background Process SGA
DBWR
LGWR
PMON
SMON
CKPT
RECO
Mandatory Optional
CTWR
CJQ
OPQO
ARCH
RVWR
Java Pool
Redo Log Buffer
Shared Pool
DB Buffer Cache
Large Pool
Streams Pool
Library Cache
Data Dictionary
Cache
Non-default Buffer
Cache
Keep Pool
Recycle Pool
Mandatory Optional
Oracle 11g Architecture - II
Oracle Instance
1 2
System Global Area
The memory structures of an Oracle Instance are contained in
a memory region called SGA, which contains data and
control information for the Oracle Server. The SGA is
allocated in the virtual memory of the computer where the
Oracle server resides. The SGA comprises several memory
structures including:
F Shared Pool: used to store information such as the most recently
executed SQL and the most recently used data from the data dictionary.
F Database Buffer Cache: used to store the most recently used data.
F Redo Log Buffer: used to register changes made to the database using
the Instancec
Oracle 11g Architecture - II
1 2
The Shared Pool
Instance
SGA
Library
Cache
Data
Dictionary
Cache
Shared Pool
F Size defined by SHARED_POOL_SIZE
F Library Cache contains statement text, parsed code,
and an execution plan
F Data Dictionary Cache contains table and column
definitions and privileges
F The shared pool is a part of the SGA that is used during the parse phase.
The size of the shared pool is defined by the initialization parameter
SHARED_POOL_SIZE in the parameter file.
Oracle 11g Architecture - II
1 2
Library Cache
The Library Cache stores the following information about the
most recently used SQL statement:
F Text of the statement
F Parse tree, which is the compiled version of
the statement
F Execution Plan, which defines the steps to
be followed in running of the statement as
determined by the optimizer
Since, the library cache stores this information, if a query is
reexecuted before its execution plan is aged out by other statements,
the server process does not need to parse the statement. Thus the
library cache helps improve the performance of applications.
Oracle 11g Architecture - II
1 2
Data Dictionary Cache
F The Data Dictionary Cache, also known as dictionary
cache or row cache is a part of the shared pool that
stores the most recently used data dictionary
information, such as table and column definitions,
usernames, passwords and privileges
F During the parse phase, the server process looks for the
information in the dictionary cache to resolve the object
names specified in the SQL statement and to validate
the access privileges. If necessary, the server process
initiates the loading this information from the datafiles
Oracle 11g Architecture - II
1 2
Database Buffer Cache
Instance
SGA
F Number of buffers defined by DB_BLOCK_BUFFERS
F Size of a buffer based on DB_BLOCK_SIZE
F Stores the most recently used blocks
Oracle 11g Architecture - II
1 2
Redo Log Buffer
Instance
SGA
F Size defined by LOG_BUFFER
F Records changes made through the instance
F Used sequentially
F Circular Buffer
Oracle 11g Architecture - II
1 2
Redo Log Buffer
The server process records changes made by an instance in the Redo log
buffer, which is the part of the SGA. The Redo log buffer has following
characteristics.
F Its size in bytes is defined by the LOG_BUFFER parameter
F It stores redo records,which record changes - that is, the block that is
changed, the location of the change, and the new value. A redo entry
registers a change, but it makes more distinction between the type of
the block that is changed. So it cannot distinguish, for example, a
change to a data block from a change to an index or a rollback block
F The redo log buffer is used sequentially, and changes made by one
transaction may be interleaved with changes made by other
transactions
F It is a circular buffer that is reused after it is filled up,but only after
all the old redo entries are recorded in the redo log files.
Oracle 11g Architecture - II
1 2
The database administrator can configure an
optional memory area called the large pool to
provide large memory allocations for
 Session memory for the shared server and the
Oracle XA interface (used where transactions
interact with more than one database)
 I/O server processes
 Oracle backup and restore operations
 Parallel execution message buffers.
Architecture
1 3
Oracle Server
Instance
SGA
Data
Data
Data
Workstation
User Process
Server Process
User
Server
Connecting to a database
Oracle 11g Architecture - III
1 3
Program Global Area (PGA)
Server
Process
PGA
F Not shared and not writable
F Contains
4 Sort Area
4 Session Information
4 Cursor state
4 Stack space
Oracle 11g Architecture - III
1 3
Program Global Area (PGA)
The Program Global Area (PGA) is a memory region that contains data
and controls information for a single server process or a single
background process. In contrast to the SGA which is shared and written
to by several processes, the PGA which is also called the Process Global
Area, is an area that is used by only one process. When using the
dedicated server configuration the PGA contains:
H Sort area: which is used for any sort that may be necessary before
rows are processed or returned to the user
H Session Information: such as user privileges for the session
H Cursor state: which indicates the stage in the processing of various
cursors that are currently used by the session
H Stack space: containing the session variables
J The PGA is allocated when a process is created and deallocated when
the process is terminated
Oracle 11g Architecture - III
1 3
Database Writer (DBWR)
Control Files
Data
Datafiles Redo Log files
Data
Data
Data
Data
Data
Instance
SGA
DBWR
Shared Pool
Database
Buffer
Cache
Oracle 11g Architecture - III
1 3
Database Writer (DBWR)
F The server process records changes to rollback and data
blocks in the buffer cache. The database writer (DBWR)
writes the dirty buffers from the database buffer cache to
the datafiles. It ensures that sufficient no. of free buffers
- buffers that can be over written when server processes
need to read in blocks from the datafiles- are available in
the database buffer cache. Database performance is
improved because server processes only make changes
in the buffer cache, and the DBWR defers writing to the
datafiles until one of the following events occur.
Oracle 11g Architecture - III
1 3
Database Writer (DBWR)
F The number of dirty buffers reaches a threshold value
F A process scans a specified number of blocks when
scanning for free buffers and cannot find any
F A timeout occurs
F A DBWR checkpoint can be triggered by various events
such as closing of the database (Check point is a means of
synchronizing the database buffer cache with the datafile
Oracle 11g Architecture - III
1 3
Log Writer (LGWR)
F The Log Writer (LGWR) is a background process that writes entries
from the redo log buffer into the redo log files.
Instance
SGA
LGWR
Shared Pool
Redo
Log
Buffer
Control Files
Data
Datafiles
Redo Log files
Data Data
Data
Data
Data
Oracle 11g Architecture - III
1 3
The LGWR performs sequential writes to the redo log files
under the following situations:
Log Writer (LGWR)
F When the redo log buffer is one-third full
F When a timeout occurs (every three seconds)
F Before DBWR writes modified blocks in the
database buffer cache to that datafiles
F When a transaction commits
Oracle 11g Architecture - III
1 3
Log Switches & Checkpoints
Control Files
Data
Datafiles Redo Log files
Data Data
Instance
SGA
LGWR
Shared Pool
Redo
Log
Buffer
Data
Data
Data
Database
Buffer
Cache
DBWR CKPT ARCH
Archived Log
Files
Data
Oracle 11g Architecture - III
1 3
Log Switches
F LGWR writes to the Online Redo Log files sequentially
that is when the current Online Redo Log group is filled
LGWR begins writing to the next group. When the last
available online redo log file is filled LGWR returns to
the first online redo log group and starts writing again
F A Log Switch is the event during which log writer stops
writing to one online redo log group and starts writing to
another
F When a Log Switch occurs an event called a check point
is initiated
Oracle 11g Architecture - III
1 3
Checkpoint Process
In high-activity databases, CKPT can be used to handle
writing log sequence numbers to the datafile headers and
control file, alleviating LGWR of that responsibility.
Oracle 11g Architecture - III
1 3
Checkpoint
F All dirty database buffers covered by the log being check pointed are
written to the datafiles by DBWR
F The checkpoint background process (CKPT) updates the headers of all
datafiles and control file to reflect that it has successfully completed.
During a check point:
Checkpoint can occur for all datafiles in database or for only specific
datafiles. A checkpoint occurs, for example, in the following situations:
F At every log switch
F When an instance has been shutdown with the normal, transactional,
or immediate option.
F When forced by setting the initialization parameters,
LOG_CHECKPOINT_INTERVAL and LOG_CHECKPOINT_TIMEOUT
F When manually requested by the database administrator
Oracle 11g Architecture - III
1 3
SMON(System Monitor Process)
The usage and the function of this background process is two
fold
F In the event of an instance failure when the structures
and the processes that comprise the Oracle instance
cannot run -the SMON process handles recovery from
the instance failure
F The SMON process handles disk space management
issues on the database by taking smaller fragments of
space and coalescing or piecing them together
Oracle 11g Architecture - III
1 3
PMON (Process Monitor Process)
F PMON watches the user processes on the database to
make sure that they work correctly. If for any reason a
user process fails during its connection to Oracle, PMON
will clean up the remnants of its activities and make sure
that any changes it may have made to the system are
"rolled back," or backed out of the database and reverted
to their original form.
Oracle 11g Architecture - III
1 3
In Oracle databases using the distributed option, this
background process handles the resolution of distributed
transactions against the database.
RECO Recoverer Process (optional)
ARCH Archiver Process (optional)
In Oracle databases that archive their online redo logs, the
ARCH process handles automatically moving a copy of the
online redo log to a log archive destination.
Oracle 11g Architecture - III
1 3
LCK0..LCK9 Lock Processes (Optional)
There can be as many as ten. In databases that use the
Parallel Server option, this background process handles
acquiring locks on remote tables for data changes.
Executes data reads from disk on behalf of user processes.
Access to Server processes can either be shared or dedicated,
depending on whether the DBA uses MTS or not.
In the MTS architecture, when users connect to the database,
they must obtain access to a shared server process via a
dispatcher process
S000..S999 (Server Process)
Oracle 11g Architecture - III
1 3
Oracle 11g Architecture - III
1 3
This process acts as part of the Oracle MTS architecture to
connect user processes to shared server processes that will
handle their SQL processing needs. The user process comes
into the database via a SQL*Net listener, which connects the
process to a dispatcher. From there, the dispatcher finds the
user process a shared server that will handle interacting with
the database to obtain data on behalf of the user process.
D001..D999 Dispatcher Process (Optional)
Reference : http://docs.oracle.com/cd/E11882_01/server.112/e16508/intro.htm
http://www.siue.edu/~dbock/cmis565/module1-architecture.htm

More Related Content

PPTX
PHP Oracle
PDF
maa-goldengate-rac-2007111.pdf
PPT
Oracle architecture
DOC
Tips on successfully upgrading to apps 11i for the non apps dba
PPT
Oracle training institutes in hyderabad
PPT
Lecture2 oracle ppt
PDF
Maa goldengate-rac-2007111
PPT
ora_sothea
PHP Oracle
maa-goldengate-rac-2007111.pdf
Oracle architecture
Tips on successfully upgrading to apps 11i for the non apps dba
Oracle training institutes in hyderabad
Lecture2 oracle ppt
Maa goldengate-rac-2007111
ora_sothea

Similar to ORACLE Architechture.ppt (20)

PPT
Introduction to oracle
PPTX
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
PPTX
Introduction to Oracle Database
PPT
Oracle 10g Introduction 1
PDF
Handy annotations-within-oracle-10g
PDF
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
PPT
PPTX
Oracle Database Introduction
PPT
Introduction to oracle
DOCX
Oracle architecture
PPT
Introduction to oracle(2)
PPT
Introduction to oracle
PDF
Database Performance Management in Cloud
PDF
DBA 101 : Calling all New Database Administrators (PPT)
PPTX
The oracle database architecture
PPTX
An Introduction To Oracle Database
PDF
Golden gate disaster recovery  tips
PDF
Oracle Database 11g SQL Tuning Workshop - Student Guide.pdf
PDF
Bt0066 database management system1
DOCX
1 ISACA JOURNAL VOLUME 1, 2012FeatureThe ability to r.docx
Introduction to oracle
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Introduction to Oracle Database
Oracle 10g Introduction 1
Handy annotations-within-oracle-10g
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
Oracle Database Introduction
Introduction to oracle
Oracle architecture
Introduction to oracle(2)
Introduction to oracle
Database Performance Management in Cloud
DBA 101 : Calling all New Database Administrators (PPT)
The oracle database architecture
An Introduction To Oracle Database
Golden gate disaster recovery  tips
Oracle Database 11g SQL Tuning Workshop - Student Guide.pdf
Bt0066 database management system1
1 ISACA JOURNAL VOLUME 1, 2012FeatureThe ability to r.docx
Ad

Recently uploaded (20)

PDF
Basic Mud Logging Guide for educational purpose
PPTX
Cell Types and Its function , kingdom of life
PDF
RMMM.pdf make it easy to upload and study
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
master seminar digital applications in india
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Classroom Observation Tools for Teachers
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Business Ethics Teaching Materials for college
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Basic Mud Logging Guide for educational purpose
Cell Types and Its function , kingdom of life
RMMM.pdf make it easy to upload and study
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
master seminar digital applications in india
Final Presentation General Medicine 03-08-2024.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
102 student loan defaulters named and shamed – Is someone you know on the list?
Classroom Observation Tools for Teachers
Pharmacology of Heart Failure /Pharmacotherapy of CHF
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Supply Chain Operations Speaking Notes -ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Business Ethics Teaching Materials for college
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Ad

ORACLE Architechture.ppt

  • 2. Major Database Release Number The first digit is the most general identifier. It represents a major new version of the software that contains significant new functionality. Database Maintenance Release Number The second digit represents a maintenance release level. Some new features may also be included. Application Server Release Number The third digit reflects the release level of the Oracle Application Server (OracleAS). Component-Specific Release Number The fourth digit identifies a release level specific to a component. Different components can have different numbers in this position depending upon, for example, component patch sets or interim releases. Platform-Specific Release Number The fifth digit identifies a platform-specific release. Usually this is a patch set. When different platforms require the equivalent patch set, this digit will be the same across the affected platforms. Identifying Your Oracle Database Software Release
  • 3. The Relational Model In his seminal 1970 paper "A Relational Model of Data for Large Shared Data Banks," E. F. Codd defined a relational model based on mathematical set theory. Today, the most widely accepted database model is the relational model. The relational model has the following major aspects: Structures Well-defined objects store or access the data of a database. Operations Clearly defined actions enable users to manipulate the data and structures of a database. Integrity rules Integrity rules govern operations on the data and structures of a database. A relational database stores data in a set of simple relations. A relation is a set of tuples. A tuple is an unordered set of attribute values. A table is a two-dimensional representation of a relation in the form of rows (tuples) and columns (attributes). Each row in a table has the same set of columns. A relational database is a database that stores data in relations (tables). For example, a relational database could store information about company employees in an employee table, a department table, and a salary table. See Also: http://portal.acm.org/citation.cfm?id=362685 for an abstract and link to Codd's paper
  • 4. Oracle Database Standard Edition One Oracle Database Standard Edition One delivers unprecedented ease of use, power, and performance for workgroup, department-level, and Web applications. From single-server environments for small business to highly distributed branch environments, Oracle Database Standard Edition One includes all the facilities necessary to build business-critical applications. Oracle Database Standard Edition Oracle Database Standard Edition delivers the unprecedented ease of use, power, and performance of Standard Edition One, with support for larger machines and clustering of services with Oracle Real Application Clusters (Oracle RAC). Oracle RAC is not included in the Standard Edition of releases prior to Oracle Database 10g, nor is it an available option with those earlier releases. Oracle Database Enterprise Edition Oracle Database Enterprise Edition provides the performance, availability, scalability, and security required for mission-critical applications such as high-volume online transaction processing (OLTP) applications, query-intensive data warehouses, and demanding Internet applications. Oracle Database Enterprise Edition contains all of the components of Oracle Database, and can be further enhanced with the purchase of the options and packs described in Chapter 2, "Options and Packs".
  • 5. Oracle Database Express Edition Oracle Database Express Edition (Oracle Database XE) is an entry-level edition of Oracle Database that is quick to download, simple to install and manage, and is free to develop, deploy, and distribute. Oracle Database XE makes it easy to upgrade to the other editions of Oracle without costly and complex migrations. Oracle Database XE can be installed on any size machine with any number of CPUs, stores up to 4GB of user data, using up to 1GB of memory, and using only one CPU on the host machine. Support is provided by an online forum. Oracle Database Personal Edition Oracle Database Personal Edition supports single- user development and deployment environments that require full compatibility with Oracle Database Standard Edition One, Oracle Database Standard Edition, and Oracle Database Enterprise Edition.
  • 6. Oracle Architecture I Objects Logical Face Database Physical Face Files O.S Tables Views Synonyms Culsters Tablespaces Procedures Functions Etc. Device Driv Hardware Disk Controlfiles Data files Redolog files
  • 8.  Every running Oracle database is associated with an Oracle instance.  When a database is started on a database server, Oracle allocates a memory area called the System Global Area (SGA), and starts some Oracle processes called background process (BP).  This combination of the SGA and the BP is called an Oracle instance. INSTANCE Architecture 1 3
  • 9.  The Oracle server is an object-relational database management system that provides and open, comprehensive, integrated approach to information management Oracle Database Users  Logging Directly from to the host  Two-tiered (client-server) connection  Three-tiered connection Oracle 11g Architecture - I 1 1
  • 10. An Oracle instance runs two types of processes - Server and Background. Server processes are created to handle requests from sessions connected to the instance. Background processes, as the name says, are processes running behind the scene and are meant to perform certain maintenance activities or to deal with abnormal conditions arising in the lifetime of the instance. Architecture 1 3
  • 11. Not all background processes are mandatory for an instance. Each background process is meant for a specific purpose and its role is well defined. We have two type of BG processes  Mandatory BG processes  Optional BG processes Architecture Before lass 1 3
  • 12.  User process Started at the time a database user requests connection to the Oracle server  Server process Connects to the Oracle Instance and is started when a user establishes a session  Background processes Started when an Oracle Instance is started Architecture 1 3
  • 13.  Background processes are invoked automatically when the instance is started.  Maintains and enforces relationships between physical and memory structures.  Mandatory background processes: • DBWn • PMON • CKPT • LGWR • SMON • RECO Background processes Architecture 1 3
  • 14. Architecture Optional Background Processes:  ARCn  LMDn  RECO  CJQ0  LMON  Snnn  Dnnn  Pnnn  LCKn  QMNn 1 3
  • 15. Instance SGA Background Processes F Oracle Server consists of an Oracle Instance and an Oracle database. An Oracle Instance consists of a memory structure called SGA (System Global Area) and background processes used by an oracle server to manage a database. An Oracle instance, which is identified by setting ORACLE_SID at the operating system,can open and use only one database at any point of time. An Oracle Instance: F Is a means to access an Oracle database F Always opens one and only one database Oracle Instance Oracle 11g Architecture - II 1 2
  • 16. Instance Background Process SGA DBWR LGWR PMON SMON CKPT RECO Mandatory Optional CTWR CJQ OPQO ARCH RVWR Java Pool Redo Log Buffer Shared Pool DB Buffer Cache Large Pool Streams Pool Library Cache Data Dictionary Cache Non-default Buffer Cache Keep Pool Recycle Pool Mandatory Optional Oracle 11g Architecture - II Oracle Instance 1 2
  • 17. System Global Area The memory structures of an Oracle Instance are contained in a memory region called SGA, which contains data and control information for the Oracle Server. The SGA is allocated in the virtual memory of the computer where the Oracle server resides. The SGA comprises several memory structures including: F Shared Pool: used to store information such as the most recently executed SQL and the most recently used data from the data dictionary. F Database Buffer Cache: used to store the most recently used data. F Redo Log Buffer: used to register changes made to the database using the Instancec Oracle 11g Architecture - II 1 2
  • 18. The Shared Pool Instance SGA Library Cache Data Dictionary Cache Shared Pool F Size defined by SHARED_POOL_SIZE F Library Cache contains statement text, parsed code, and an execution plan F Data Dictionary Cache contains table and column definitions and privileges F The shared pool is a part of the SGA that is used during the parse phase. The size of the shared pool is defined by the initialization parameter SHARED_POOL_SIZE in the parameter file. Oracle 11g Architecture - II 1 2
  • 19. Library Cache The Library Cache stores the following information about the most recently used SQL statement: F Text of the statement F Parse tree, which is the compiled version of the statement F Execution Plan, which defines the steps to be followed in running of the statement as determined by the optimizer Since, the library cache stores this information, if a query is reexecuted before its execution plan is aged out by other statements, the server process does not need to parse the statement. Thus the library cache helps improve the performance of applications. Oracle 11g Architecture - II 1 2
  • 20. Data Dictionary Cache F The Data Dictionary Cache, also known as dictionary cache or row cache is a part of the shared pool that stores the most recently used data dictionary information, such as table and column definitions, usernames, passwords and privileges F During the parse phase, the server process looks for the information in the dictionary cache to resolve the object names specified in the SQL statement and to validate the access privileges. If necessary, the server process initiates the loading this information from the datafiles Oracle 11g Architecture - II 1 2
  • 21. Database Buffer Cache Instance SGA F Number of buffers defined by DB_BLOCK_BUFFERS F Size of a buffer based on DB_BLOCK_SIZE F Stores the most recently used blocks Oracle 11g Architecture - II 1 2
  • 22. Redo Log Buffer Instance SGA F Size defined by LOG_BUFFER F Records changes made through the instance F Used sequentially F Circular Buffer Oracle 11g Architecture - II 1 2
  • 23. Redo Log Buffer The server process records changes made by an instance in the Redo log buffer, which is the part of the SGA. The Redo log buffer has following characteristics. F Its size in bytes is defined by the LOG_BUFFER parameter F It stores redo records,which record changes - that is, the block that is changed, the location of the change, and the new value. A redo entry registers a change, but it makes more distinction between the type of the block that is changed. So it cannot distinguish, for example, a change to a data block from a change to an index or a rollback block F The redo log buffer is used sequentially, and changes made by one transaction may be interleaved with changes made by other transactions F It is a circular buffer that is reused after it is filled up,but only after all the old redo entries are recorded in the redo log files. Oracle 11g Architecture - II 1 2
  • 24. The database administrator can configure an optional memory area called the large pool to provide large memory allocations for  Session memory for the shared server and the Oracle XA interface (used where transactions interact with more than one database)  I/O server processes  Oracle backup and restore operations  Parallel execution message buffers. Architecture 1 3
  • 25. Oracle Server Instance SGA Data Data Data Workstation User Process Server Process User Server Connecting to a database Oracle 11g Architecture - III 1 3
  • 26. Program Global Area (PGA) Server Process PGA F Not shared and not writable F Contains 4 Sort Area 4 Session Information 4 Cursor state 4 Stack space Oracle 11g Architecture - III 1 3
  • 27. Program Global Area (PGA) The Program Global Area (PGA) is a memory region that contains data and controls information for a single server process or a single background process. In contrast to the SGA which is shared and written to by several processes, the PGA which is also called the Process Global Area, is an area that is used by only one process. When using the dedicated server configuration the PGA contains: H Sort area: which is used for any sort that may be necessary before rows are processed or returned to the user H Session Information: such as user privileges for the session H Cursor state: which indicates the stage in the processing of various cursors that are currently used by the session H Stack space: containing the session variables J The PGA is allocated when a process is created and deallocated when the process is terminated Oracle 11g Architecture - III 1 3
  • 28. Database Writer (DBWR) Control Files Data Datafiles Redo Log files Data Data Data Data Data Instance SGA DBWR Shared Pool Database Buffer Cache Oracle 11g Architecture - III 1 3
  • 29. Database Writer (DBWR) F The server process records changes to rollback and data blocks in the buffer cache. The database writer (DBWR) writes the dirty buffers from the database buffer cache to the datafiles. It ensures that sufficient no. of free buffers - buffers that can be over written when server processes need to read in blocks from the datafiles- are available in the database buffer cache. Database performance is improved because server processes only make changes in the buffer cache, and the DBWR defers writing to the datafiles until one of the following events occur. Oracle 11g Architecture - III 1 3
  • 30. Database Writer (DBWR) F The number of dirty buffers reaches a threshold value F A process scans a specified number of blocks when scanning for free buffers and cannot find any F A timeout occurs F A DBWR checkpoint can be triggered by various events such as closing of the database (Check point is a means of synchronizing the database buffer cache with the datafile Oracle 11g Architecture - III 1 3
  • 31. Log Writer (LGWR) F The Log Writer (LGWR) is a background process that writes entries from the redo log buffer into the redo log files. Instance SGA LGWR Shared Pool Redo Log Buffer Control Files Data Datafiles Redo Log files Data Data Data Data Data Oracle 11g Architecture - III 1 3
  • 32. The LGWR performs sequential writes to the redo log files under the following situations: Log Writer (LGWR) F When the redo log buffer is one-third full F When a timeout occurs (every three seconds) F Before DBWR writes modified blocks in the database buffer cache to that datafiles F When a transaction commits Oracle 11g Architecture - III 1 3
  • 33. Log Switches & Checkpoints Control Files Data Datafiles Redo Log files Data Data Instance SGA LGWR Shared Pool Redo Log Buffer Data Data Data Database Buffer Cache DBWR CKPT ARCH Archived Log Files Data Oracle 11g Architecture - III 1 3
  • 34. Log Switches F LGWR writes to the Online Redo Log files sequentially that is when the current Online Redo Log group is filled LGWR begins writing to the next group. When the last available online redo log file is filled LGWR returns to the first online redo log group and starts writing again F A Log Switch is the event during which log writer stops writing to one online redo log group and starts writing to another F When a Log Switch occurs an event called a check point is initiated Oracle 11g Architecture - III 1 3
  • 35. Checkpoint Process In high-activity databases, CKPT can be used to handle writing log sequence numbers to the datafile headers and control file, alleviating LGWR of that responsibility. Oracle 11g Architecture - III 1 3
  • 36. Checkpoint F All dirty database buffers covered by the log being check pointed are written to the datafiles by DBWR F The checkpoint background process (CKPT) updates the headers of all datafiles and control file to reflect that it has successfully completed. During a check point: Checkpoint can occur for all datafiles in database or for only specific datafiles. A checkpoint occurs, for example, in the following situations: F At every log switch F When an instance has been shutdown with the normal, transactional, or immediate option. F When forced by setting the initialization parameters, LOG_CHECKPOINT_INTERVAL and LOG_CHECKPOINT_TIMEOUT F When manually requested by the database administrator Oracle 11g Architecture - III 1 3
  • 37. SMON(System Monitor Process) The usage and the function of this background process is two fold F In the event of an instance failure when the structures and the processes that comprise the Oracle instance cannot run -the SMON process handles recovery from the instance failure F The SMON process handles disk space management issues on the database by taking smaller fragments of space and coalescing or piecing them together Oracle 11g Architecture - III 1 3
  • 38. PMON (Process Monitor Process) F PMON watches the user processes on the database to make sure that they work correctly. If for any reason a user process fails during its connection to Oracle, PMON will clean up the remnants of its activities and make sure that any changes it may have made to the system are "rolled back," or backed out of the database and reverted to their original form. Oracle 11g Architecture - III 1 3 In Oracle databases using the distributed option, this background process handles the resolution of distributed transactions against the database. RECO Recoverer Process (optional)
  • 39. ARCH Archiver Process (optional) In Oracle databases that archive their online redo logs, the ARCH process handles automatically moving a copy of the online redo log to a log archive destination. Oracle 11g Architecture - III 1 3 LCK0..LCK9 Lock Processes (Optional) There can be as many as ten. In databases that use the Parallel Server option, this background process handles acquiring locks on remote tables for data changes.
  • 40. Executes data reads from disk on behalf of user processes. Access to Server processes can either be shared or dedicated, depending on whether the DBA uses MTS or not. In the MTS architecture, when users connect to the database, they must obtain access to a shared server process via a dispatcher process S000..S999 (Server Process) Oracle 11g Architecture - III 1 3
  • 41. Oracle 11g Architecture - III 1 3 This process acts as part of the Oracle MTS architecture to connect user processes to shared server processes that will handle their SQL processing needs. The user process comes into the database via a SQL*Net listener, which connects the process to a dispatcher. From there, the dispatcher finds the user process a shared server that will handle interacting with the database to obtain data on behalf of the user process. D001..D999 Dispatcher Process (Optional) Reference : http://docs.oracle.com/cd/E11882_01/server.112/e16508/intro.htm http://www.siue.edu/~dbock/cmis565/module1-architecture.htm