SlideShare a Scribd company logo
1 of 52
Download to read offline
ORACLE INSTANCE ARCHITECTURE
ORACLE ARCHITECTURE
ORACLE ARCHITECTURE
 Oracle Database Instance
 Memory Architecture
 Process Architecture
 Application and Networking Architecture
 Application and Networking Architecture
2
2
INTRODUCTION TO THE ORACLE DATABASE
INSTANCE
 A database instance is a set of memory
structures that manage database files
A d t b i t f h i l fil di k
 A database is a set of physical files on disk
 The instance manages its associated data and
serves the users of the database
serves the users of the database
 Every running Oracle database is associated
with at least one Oracle database instance
with at least one Oracle database instance
 Instance can exist without Database
 Database Can exist without instance
 Database Can exist without instance
DATABASE INSTANCE STRUCTURE
 What happens When an instance is started,
 Oracle Database allocates a memory area called the
system global area (SGA)
 Starts one or more background processes The SGA
 Starts one or more background processes. The SGA
serves various purposes, including the following:
DATABASE INSTANCE STRUCTURE
 What does SGA does
 Maintaining internal data structures that are accessed
by many processes and threads concurrently
by many processes and threads concurrently
 Caching data blocks read from disk
 Buffering redo data before writing it to the online redo
g g
log files
 Storing SQL execution plans
DATABASE INSTANCE CONFIGURATIONS
 You can run Oracle Database in either of the
following mutually exclusive configurations:
Single instance configuration
 Single-instance configuration
 A one-to-one relationship exists between the database and an
instance
 Oracle Real Application Clusters (Oracle RAC)
configuration
configuration
 one-to-many relationship exists between the database and
instances
DATABASE INSTANCE CONFIGURATIONS
 Whether in a single-instance or Oracle RAC
configuration, a database instance is associated
with only one database at a time
with only one database at a time.
 You can start a database instance and mount
 You can start a database instance and mount
(associate the instance with) one database, but not
mount two databases simultaneously with the same
mount two databases simultaneously with the same
instance
 Multiple instances can run concurrently on the
same computer/ Server, each accessing its own
database
DATABASE INSTANCE CONFIGURATIONS
 Duration of an Instance
 An instance begins when it is created with the
STARTUP command and ends when it is terminated
STARTUP command and ends when it is terminated
 During this period, an instance can associate itself with
g p ,
one and only one database
INSTANCE AND DATABASE STARTUP
DATABASE AND INSTANCE SHUTDOWN
SHUTDOWN MODES
CHECKPOINTS
 A checkpoint is a crucial mechanism in
consistent database shutdowns, instance
recovery and Oracle Database operation
recovery, and Oracle Database operation
 Purpose of Checkpoints
 Purpose of Checkpoints
 Reduce the time required for recovery in case of an
instance or media failure
 Ensure that dirty buffers in the buffer cache are written
to disk regularly
 Ensure that all committed data is written to disk during a
consistent shutdown
INSTANCE RECOVERY
 Instance recovery is the process of applying
records in the online redo log to data files to
reconstruct changes made after the most recent
reconstruct changes made after the most recent
checkpoint
 Instance recovery occurs automatically when an
administrator attempts to open a database that was
administrator attempts to open a database that was
previously shut down inconsistently.
 Instance recovery ensures that the database is in a
consistent state after an instance failure.
WHEN ORACLE DATABASE PERFORMS
INSTANCE RECOVERY
Wh th i t i i d d d
 Whether instance recovery is required depends on
the state of the redo threads.
 A redo thread is marked open in the control file
when a database instance opens in read/write
p
mode, and is marked closed when the instance is
shut down consistently.
 The database opens for the first time after the
failure of a single-instance database or all instances
failure of a single instance database or all instances
of an Oracle RAC database
 Some but not all instances of an Oracle RAC
database fail
PARAMETER FILES
 To start a database instance, Oracle Database
must read either a server parameter file, which is
recommended or a text initialization parameter
recommended, or a text initialization parameter
file, which is a legacy implementation.
 These files contain a list of configuration
parameters
parameters
PARAMETER FILES
 Server Parameter Files
 A server parameter file is a repository for initialization
parameters that is managed by Oracle Database
parameters that is managed by Oracle Database.
 Characteristics of Server Parameter file.
 Only one server parameter file exists for a database
 Only one server parameter file exists for a database
 The server parameter file is written to and read only by
Oracle Database
 The server parameter file is binary file
PARAMETER FILES
 Text Initialization Parameter Files
 A text initialization parameter file is a text file that
contains a list of initialization parameters
contains a list of initialization parameters.
 Characteristics of Text Initialization Parameter file
 Characteristics of Text Initialization Parameter file.
 Reside on the same host
 A text initialization parameter file is text-based, not
p ,
binary
 Oracle Database can read but not write to the text
initialization parameter file
initialization parameter file
TRACE FILES
 A trace file is an administrative file that contain
diagnostic data used to investigate problems
ORACLE DATABASE MEMORY STRUCTURES
 When an instance is started, Oracle Database
allocates a memory area and starts background
processes
processes.
 The memory area stores information such as the
following
following
 Program code
 Information about each connected session
 Information needed during program execution
 Information such as lock data that is shared and
communicated among processes
 Cached data, such as data blocks and redo records,
that also exists on disk
that also exists on disk
BASIC MEMORY STRUCTURES
S t l b l (SGA)
 System global area (SGA)
 The SGA is a group of shared memory structures,
known as SGA components, that contain data and
p ,
control information for one Oracle Database
instance
 Program global area (PGA)
 Program global area (PGA)
 A PGA is a nonshared memory region that contains data
and control information exclusively for use by an Oracle
process
 User Global Area (UGA)
 The UGA is memory associated with a user session
 The UGA is memory associated with a user session.
 Software code areas
 Software code areas are portions of memory used to
p y
store code that is being run or can be run.
DATABASE MEMORY MANAGEMENT
 Memory management involves maintaining optimal
sizes for the Oracle instance memory structures as
demands on the database change
demands on the database change
 Automatic memory management
 Automatic shared memory management
Automatic shared memory management
 Partially automated
 Manual memory management
 Instead of setting the total memory size individually set SGA
and PGA memmory.
USER GLOBAL AREA
 The UGA is session memory
 Memory allocated for session variables
l i f ti
 logon information
 P/L SQL Package State.
PROGRAM GLOBAL AREA
 The PGA is memory specific to an operating
process or thread that is not shared by other
processes or threads on the system
processes or threads on the system
 PGA is process specific it is never allocated in the
 PGA is process-specific, it is never allocated in the
SGA.
CONTENTS OF THE PGA
CONTENTS OF THE PGA
 Private SQL Area
 The run-time area
This area contains query execution state information
 This area contains query execution state information
 The persistent area
The persistent area
 This area contains variable values
 A variable value is supplied to a SQL statement at run time
when the statement is executed
when the statement is executed
 SQL Work Areas
Q
 A work area is a private allocation of PGA memory
used for memory-intensive operations.
SYSTEM GLOBAL AREA
 The SGA is a read/write memory area that, along
with the Oracle background processes, make up a
database instance
database instance
 All server processes that execute on behalf of users
 All server processes that execute on behalf of users
can read information in the instance SGA
 Each database instance has its own SGA.
SGA COMPONENTS
 The most important SGA components are the
following
Database Buffer Cache
 Database Buffer Cache
 Redo Log Buffer
 Shared Pool
 Shared Pool
 Large Pool
 Java Pool
 Fixed SGA
DATABASE BUFFER CACHE
 The database buffer cache, also called the buffer
cache, is the memory area that stores copies of
data blocks read from data files
data blocks read from data files.
 Why Buffer Cache
 Optimize physical I/O
 Optimize physical I/O
 Keep frequently accessed blocks in the buffer cache
and write infrequently accessed blocks to disk
q y
BUFFER STATES
 The database uses internal algorithms to manage
buffers in the cache
A b ff b i f th f ll i t ll
 A buffer can be in any of the following mutually
exclusive states:
 Unused
 Unused
 The buffer is available for use because it has never been used
or is currently unused
 Clean
 This buffer was used earlier and now contains a read-
consistent version of a block as of a point in time.
p
 Dirty
 The buffer contain modified data that has not yet been written
to disk
to disk
REDO LOG BUFFER
 The redo log buffer is a circular buffer in the SGA
that stores redo entries describing changes made
to the database
to the database.
 Redo entries contain the information necessary to
 Redo entries contain the information necessary to
reconstruct, or redo, changes made to the database
by DML or DDL operations.
by DML or DDL operations.
 Database recovery applies redo entries to data files
 Database recovery applies redo entries to data files
to reconstruct lost changes.
SHARED POOL
 The shared pool caches various types of
program data
Parsed SQL/PLSQL
 Parsed SQL/PLSQL
 System Parameters
 Data dictionary Information
 Data dictionary Information.
LARGE POOL
 The large pool is an optional memory area
intended for memory allocations that are larger
than is appropriate for the shared pool
than is appropriate for the shared pool
 UGA for the shared server where transactions interact
 UGA for the shared server where transactions interact
with multiple databases
 Message buffers used in the parallel execution of
statements
 Buffers for Recovery Manager (RMAN)
JAVA POOL
 The Java pool is an area of memory that stores all
session-specific Java code and data within the Java
Virtual Machine (JVM)
Virtual Machine (JVM).
FIXED SGA
 The fixed SGA is an internal housekeeping area
 General information about the state of the database and
the instance, which the background processes need to
access
 Information communicated between processes, such as
information about locks
PROCESS ARCHITECTURE
INTRODUCTION TO PROCESSES
 A process is a mechanism in an operating
system that can run a series of steps
 All connected Oracle Database users must run the
following modules to access a database instance
following modules to access a database instance
 Application or Oracle Database utility
 Oracle database code
 Oracle database code
 A process normally runs in its own private memory
 A process normally runs in its own private memory
area
TYPES OF PROCESSES
 Client processes
 run the application
O l t l d
 Oracle tool code
 Oracle processes
 Run the Oracle database code
 Run the Oracle database code
 Background processes
 start with the database instance
 perform maintenance tasks (instance recovery, cleaning up
processes , writing redo buffers to disk ….)
 Slave processes
 Slave processes
 perform additional tasks for a background or server process
CLIENT PROCESSES
 When a user runs an application such as a Pro*C
program or SQL*Plus, the operating system creates
a client process (sometimes called a user process)
a client process (sometimes called a user process)
to run the user application.
 The client application has Oracle Database libraries
linked into it that provide the APIs required to
linked into it that provide the APIs required to
communicate with the database.
CONNECTIONS AND SESSIONS
 Connection
 A connection is a physical communication
th b t li t d
pathway between a client process and a
database instance
 A communication pathway is established using
available interprocess communication
available interprocess communication
mechanisms or network software
CONNECTIONS AND SESSIONS
 Session
 A session is a logical entity in the database
i t th t t th t t f
instance memory that represents the state of a
current user login to a database
 A single connection can have 0 1 or more
 A single connection can have 0, 1, or more
sessions established on it
 The sessions are independent: a commit in one
 The sessions are independent: a commit in one
session does not affect transactions in other
sessions
SERVER PROCESSES
 Oracle Database creates server processes to
h dl th t f li t t d
handle the requests of client processes connected
to the instance
 A client process always communicates with a
database through a separate server process
database through a separate server process.
DEDICATED SERVER PROCESSES
 In dedicated server connections, the client
connection is associated with one and only one
server process
server process
 Each client process communicates directly with its
server process
server process
 This server process is dedicated to its client
process for the duration of the session.
process for the duration of the session.
SHARED SERVER PROCESSES
 In shared server connections, client applications
connect over a network to a dispatcher process, not
a server process
a server process
 The dispatcher process receives requests from
connected clients and puts them into a request
connected clients and puts them into a request
queue in the large pool
 The first available shared server process takes the
 The first available shared server process takes the
request from the queue and processes it.
 shared server place the result into the dispatcher
p p
response queue
BACKGROUND PROCESSES
 Mandatory Background Processes
 Optional Background Processes
 Slave Processes
MANDATORY BACKGROUND PROCESSES
 The mandatory background processes are present
in all typical database configurations
Process Monitor Process (PMON)
 Process Monitor Process (PMON)
 System Monitor Process (SMON)
 Database Writer Process (DBWn)
 Database Writer Process (DBWn)
 Log Writer Process (LGWR)
 Checkpoint Process (CKPT)
p ( )
 Manageability Monitor Processes (MMON and MMNL)
 Recoverer Process (RECO)

More Related Content

Similar to 02 Oracle _Instance_Architecture_2.pdf

Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
Mohsen B
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installation
vivaankumar
 
Less02 Installation
Less02  InstallationLess02  Installation
Less02 Installation
vivaankumar
 
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_StdsIRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
David G. Peterson, PMP
 
Oracle db architecture
Oracle db architectureOracle db architecture
Oracle db architecture
Simon Huang
 

Similar to 02 Oracle _Instance_Architecture_2.pdf (20)

Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
 
Oracle Database Introduction
Oracle Database IntroductionOracle Database Introduction
Oracle Database Introduction
 
ora_sothea
ora_sotheaora_sothea
ora_sothea
 
Oracle Database Architecture
Oracle Database ArchitectureOracle Database Architecture
Oracle Database Architecture
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)
 
ORACLE Architechture.ppt
ORACLE Architechture.pptORACLE Architechture.ppt
ORACLE Architechture.ppt
 
Lecture2 oracle ppt
Lecture2 oracle pptLecture2 oracle ppt
Lecture2 oracle ppt
 
PHP Oracle
PHP OraclePHP Oracle
PHP Oracle
 
Oracle11g notes
Oracle11g notesOracle11g notes
Oracle11g notes
 
Maa goldengate-rac-2007111
Maa goldengate-rac-2007111Maa goldengate-rac-2007111
Maa goldengate-rac-2007111
 
Sg1 Cover Page
Sg1 Cover PageSg1 Cover Page
Sg1 Cover Page
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installation
 
Less02 Installation
Less02  InstallationLess02  Installation
Less02 Installation
 
maa-goldengate-rac-2007111.pdf
maa-goldengate-rac-2007111.pdfmaa-goldengate-rac-2007111.pdf
maa-goldengate-rac-2007111.pdf
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architecture
 
Oracle dba training
Oracle  dba    training Oracle  dba    training
Oracle dba training
 
Ora01_OraArc.pdf
Ora01_OraArc.pdfOra01_OraArc.pdf
Ora01_OraArc.pdf
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_StdsIRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
 
Oracle db architecture
Oracle db architectureOracle db architecture
Oracle db architecture
 

More from bszool006

Radimatric dating112121123121242342134125125.ppt
Radimatric dating112121123121242342134125125.pptRadimatric dating112121123121242342134125125.ppt
Radimatric dating112121123121242342134125125.ppt
bszool006
 
C h a p t . 5- Li pi d s .p pt
C  h  a    p   t   .     5- Li pi d s  .p ptC  h  a    p   t   .     5- Li pi d s  .p pt
C h a p t . 5- Li pi d s .p pt
bszool006
 
s e d i m e n t r y .sasfsfqsfsfsadgagga p p t x
s e  d   i m e n  t r y .sasfsfqsfsfsadgagga p p t xs e  d   i m e n  t r y .sasfsfqsfsfsadgagga p p t x
s e d i m e n t r y .sasfsfqsfsfsadgagga p p t x
bszool006
 
presentation1-170518174 325.pdf
presentation1-170518174             325.pdfpresentation1-170518174             325.pdf
presentation1-170518174 325.pdf
bszool006
 
89372248-Wildlife-Sanctu aries.pptx
89372248-Wildlife-Sanctu              aries.pptx89372248-Wildlife-Sanctu              aries.pptx
89372248-Wildlife-Sanctu aries.pptx
bszool006
 
409332495-Protected-Areas-in-Pakistan (2).pptx
409332495-Protected-Areas-in-Pakistan (2).pptx409332495-Protected-Areas-in-Pakistan (2).pptx
409332495-Protected-Areas-in-Pakistan (2).pptx
bszool006
 
neurotansmitters1212121212121212121212.ppt
neurotansmitters1212121212121212121212.pptneurotansmitters1212121212121212121212.ppt
neurotansmitters1212121212121212121212.ppt
bszool006
 
biology zoology notes 12121212312321424324213241243424214
biology zoology notes 12121212312321424324213241243424214biology zoology notes 12121212312321424324213241243424214
biology zoology notes 12121212312321424324213241243424214
bszool006
 

More from bszool006 (9)

2 _ LuisaA.ppt
2                            _     LuisaA.ppt2                            _     LuisaA.ppt
2 _ LuisaA.ppt
 
Radimatric dating112121123121242342134125125.ppt
Radimatric dating112121123121242342134125125.pptRadimatric dating112121123121242342134125125.ppt
Radimatric dating112121123121242342134125125.ppt
 
C h a p t . 5- Li pi d s .p pt
C  h  a    p   t   .     5- Li pi d s  .p ptC  h  a    p   t   .     5- Li pi d s  .p pt
C h a p t . 5- Li pi d s .p pt
 
s e d i m e n t r y .sasfsfqsfsfsadgagga p p t x
s e  d   i m e n  t r y .sasfsfqsfsfsadgagga p p t xs e  d   i m e n  t r y .sasfsfqsfsfsadgagga p p t x
s e d i m e n t r y .sasfsfqsfsfsadgagga p p t x
 
presentation1-170518174 325.pdf
presentation1-170518174             325.pdfpresentation1-170518174             325.pdf
presentation1-170518174 325.pdf
 
89372248-Wildlife-Sanctu aries.pptx
89372248-Wildlife-Sanctu              aries.pptx89372248-Wildlife-Sanctu              aries.pptx
89372248-Wildlife-Sanctu aries.pptx
 
409332495-Protected-Areas-in-Pakistan (2).pptx
409332495-Protected-Areas-in-Pakistan (2).pptx409332495-Protected-Areas-in-Pakistan (2).pptx
409332495-Protected-Areas-in-Pakistan (2).pptx
 
neurotansmitters1212121212121212121212.ppt
neurotansmitters1212121212121212121212.pptneurotansmitters1212121212121212121212.ppt
neurotansmitters1212121212121212121212.ppt
 
biology zoology notes 12121212312321424324213241243424214
biology zoology notes 12121212312321424324213241243424214biology zoology notes 12121212312321424324213241243424214
biology zoology notes 12121212312321424324213241243424214
 

Recently uploaded

The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
factors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptxfactors influencing drug absorption-final-2.pptx
factors influencing drug absorption-final-2.pptx
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 

02 Oracle _Instance_Architecture_2.pdf

  • 2. ORACLE ARCHITECTURE ORACLE ARCHITECTURE  Oracle Database Instance  Memory Architecture  Process Architecture  Application and Networking Architecture  Application and Networking Architecture 2 2
  • 3. INTRODUCTION TO THE ORACLE DATABASE INSTANCE  A database instance is a set of memory structures that manage database files A d t b i t f h i l fil di k  A database is a set of physical files on disk  The instance manages its associated data and serves the users of the database serves the users of the database  Every running Oracle database is associated with at least one Oracle database instance with at least one Oracle database instance  Instance can exist without Database  Database Can exist without instance  Database Can exist without instance
  • 4. DATABASE INSTANCE STRUCTURE  What happens When an instance is started,  Oracle Database allocates a memory area called the system global area (SGA)  Starts one or more background processes The SGA  Starts one or more background processes. The SGA serves various purposes, including the following:
  • 5. DATABASE INSTANCE STRUCTURE  What does SGA does  Maintaining internal data structures that are accessed by many processes and threads concurrently by many processes and threads concurrently  Caching data blocks read from disk  Buffering redo data before writing it to the online redo g g log files  Storing SQL execution plans
  • 6.
  • 7. DATABASE INSTANCE CONFIGURATIONS  You can run Oracle Database in either of the following mutually exclusive configurations: Single instance configuration  Single-instance configuration  A one-to-one relationship exists between the database and an instance  Oracle Real Application Clusters (Oracle RAC) configuration configuration  one-to-many relationship exists between the database and instances
  • 8.
  • 9. DATABASE INSTANCE CONFIGURATIONS  Whether in a single-instance or Oracle RAC configuration, a database instance is associated with only one database at a time with only one database at a time.  You can start a database instance and mount  You can start a database instance and mount (associate the instance with) one database, but not mount two databases simultaneously with the same mount two databases simultaneously with the same instance  Multiple instances can run concurrently on the same computer/ Server, each accessing its own database
  • 10. DATABASE INSTANCE CONFIGURATIONS  Duration of an Instance  An instance begins when it is created with the STARTUP command and ends when it is terminated STARTUP command and ends when it is terminated  During this period, an instance can associate itself with g p , one and only one database
  • 14. CHECKPOINTS  A checkpoint is a crucial mechanism in consistent database shutdowns, instance recovery and Oracle Database operation recovery, and Oracle Database operation  Purpose of Checkpoints  Purpose of Checkpoints  Reduce the time required for recovery in case of an instance or media failure  Ensure that dirty buffers in the buffer cache are written to disk regularly  Ensure that all committed data is written to disk during a consistent shutdown
  • 15. INSTANCE RECOVERY  Instance recovery is the process of applying records in the online redo log to data files to reconstruct changes made after the most recent reconstruct changes made after the most recent checkpoint  Instance recovery occurs automatically when an administrator attempts to open a database that was administrator attempts to open a database that was previously shut down inconsistently.  Instance recovery ensures that the database is in a consistent state after an instance failure.
  • 16. WHEN ORACLE DATABASE PERFORMS INSTANCE RECOVERY Wh th i t i i d d d  Whether instance recovery is required depends on the state of the redo threads.  A redo thread is marked open in the control file when a database instance opens in read/write p mode, and is marked closed when the instance is shut down consistently.  The database opens for the first time after the failure of a single-instance database or all instances failure of a single instance database or all instances of an Oracle RAC database  Some but not all instances of an Oracle RAC database fail
  • 17. PARAMETER FILES  To start a database instance, Oracle Database must read either a server parameter file, which is recommended or a text initialization parameter recommended, or a text initialization parameter file, which is a legacy implementation.  These files contain a list of configuration parameters parameters
  • 18. PARAMETER FILES  Server Parameter Files  A server parameter file is a repository for initialization parameters that is managed by Oracle Database parameters that is managed by Oracle Database.  Characteristics of Server Parameter file.  Only one server parameter file exists for a database  Only one server parameter file exists for a database  The server parameter file is written to and read only by Oracle Database  The server parameter file is binary file
  • 19. PARAMETER FILES  Text Initialization Parameter Files  A text initialization parameter file is a text file that contains a list of initialization parameters contains a list of initialization parameters.  Characteristics of Text Initialization Parameter file  Characteristics of Text Initialization Parameter file.  Reside on the same host  A text initialization parameter file is text-based, not p , binary  Oracle Database can read but not write to the text initialization parameter file initialization parameter file
  • 20. TRACE FILES  A trace file is an administrative file that contain diagnostic data used to investigate problems
  • 21. ORACLE DATABASE MEMORY STRUCTURES  When an instance is started, Oracle Database allocates a memory area and starts background processes processes.  The memory area stores information such as the following following  Program code  Information about each connected session  Information needed during program execution  Information such as lock data that is shared and communicated among processes  Cached data, such as data blocks and redo records, that also exists on disk that also exists on disk
  • 22. BASIC MEMORY STRUCTURES S t l b l (SGA)  System global area (SGA)  The SGA is a group of shared memory structures, known as SGA components, that contain data and p , control information for one Oracle Database instance  Program global area (PGA)  Program global area (PGA)  A PGA is a nonshared memory region that contains data and control information exclusively for use by an Oracle process  User Global Area (UGA)  The UGA is memory associated with a user session  The UGA is memory associated with a user session.  Software code areas  Software code areas are portions of memory used to p y store code that is being run or can be run.
  • 23. DATABASE MEMORY MANAGEMENT  Memory management involves maintaining optimal sizes for the Oracle instance memory structures as demands on the database change demands on the database change  Automatic memory management  Automatic shared memory management Automatic shared memory management  Partially automated  Manual memory management  Instead of setting the total memory size individually set SGA and PGA memmory.
  • 24. USER GLOBAL AREA  The UGA is session memory  Memory allocated for session variables l i f ti  logon information  P/L SQL Package State.
  • 25. PROGRAM GLOBAL AREA  The PGA is memory specific to an operating process or thread that is not shared by other processes or threads on the system processes or threads on the system  PGA is process specific it is never allocated in the  PGA is process-specific, it is never allocated in the SGA.
  • 27. CONTENTS OF THE PGA  Private SQL Area  The run-time area This area contains query execution state information  This area contains query execution state information  The persistent area The persistent area  This area contains variable values  A variable value is supplied to a SQL statement at run time when the statement is executed when the statement is executed  SQL Work Areas Q  A work area is a private allocation of PGA memory used for memory-intensive operations.
  • 28. SYSTEM GLOBAL AREA  The SGA is a read/write memory area that, along with the Oracle background processes, make up a database instance database instance  All server processes that execute on behalf of users  All server processes that execute on behalf of users can read information in the instance SGA  Each database instance has its own SGA.
  • 29.
  • 30. SGA COMPONENTS  The most important SGA components are the following Database Buffer Cache  Database Buffer Cache  Redo Log Buffer  Shared Pool  Shared Pool  Large Pool  Java Pool  Fixed SGA
  • 31. DATABASE BUFFER CACHE  The database buffer cache, also called the buffer cache, is the memory area that stores copies of data blocks read from data files data blocks read from data files.  Why Buffer Cache  Optimize physical I/O  Optimize physical I/O  Keep frequently accessed blocks in the buffer cache and write infrequently accessed blocks to disk q y
  • 32. BUFFER STATES  The database uses internal algorithms to manage buffers in the cache A b ff b i f th f ll i t ll  A buffer can be in any of the following mutually exclusive states:  Unused  Unused  The buffer is available for use because it has never been used or is currently unused  Clean  This buffer was used earlier and now contains a read- consistent version of a block as of a point in time. p  Dirty  The buffer contain modified data that has not yet been written to disk to disk
  • 33.
  • 34. REDO LOG BUFFER  The redo log buffer is a circular buffer in the SGA that stores redo entries describing changes made to the database to the database.  Redo entries contain the information necessary to  Redo entries contain the information necessary to reconstruct, or redo, changes made to the database by DML or DDL operations. by DML or DDL operations.  Database recovery applies redo entries to data files  Database recovery applies redo entries to data files to reconstruct lost changes.
  • 35.
  • 36. SHARED POOL  The shared pool caches various types of program data Parsed SQL/PLSQL  Parsed SQL/PLSQL  System Parameters  Data dictionary Information  Data dictionary Information.
  • 37. LARGE POOL  The large pool is an optional memory area intended for memory allocations that are larger than is appropriate for the shared pool than is appropriate for the shared pool  UGA for the shared server where transactions interact  UGA for the shared server where transactions interact with multiple databases  Message buffers used in the parallel execution of statements  Buffers for Recovery Manager (RMAN)
  • 38. JAVA POOL  The Java pool is an area of memory that stores all session-specific Java code and data within the Java Virtual Machine (JVM) Virtual Machine (JVM).
  • 39. FIXED SGA  The fixed SGA is an internal housekeeping area  General information about the state of the database and the instance, which the background processes need to access  Information communicated between processes, such as information about locks
  • 41. INTRODUCTION TO PROCESSES  A process is a mechanism in an operating system that can run a series of steps  All connected Oracle Database users must run the following modules to access a database instance following modules to access a database instance  Application or Oracle Database utility  Oracle database code  Oracle database code  A process normally runs in its own private memory  A process normally runs in its own private memory area
  • 42. TYPES OF PROCESSES  Client processes  run the application O l t l d  Oracle tool code  Oracle processes  Run the Oracle database code  Run the Oracle database code  Background processes  start with the database instance  perform maintenance tasks (instance recovery, cleaning up processes , writing redo buffers to disk ….)  Slave processes  Slave processes  perform additional tasks for a background or server process
  • 43.
  • 44. CLIENT PROCESSES  When a user runs an application such as a Pro*C program or SQL*Plus, the operating system creates a client process (sometimes called a user process) a client process (sometimes called a user process) to run the user application.  The client application has Oracle Database libraries linked into it that provide the APIs required to linked into it that provide the APIs required to communicate with the database.
  • 45. CONNECTIONS AND SESSIONS  Connection  A connection is a physical communication th b t li t d pathway between a client process and a database instance  A communication pathway is established using available interprocess communication available interprocess communication mechanisms or network software
  • 46. CONNECTIONS AND SESSIONS  Session  A session is a logical entity in the database i t th t t th t t f instance memory that represents the state of a current user login to a database  A single connection can have 0 1 or more  A single connection can have 0, 1, or more sessions established on it  The sessions are independent: a commit in one  The sessions are independent: a commit in one session does not affect transactions in other sessions
  • 47.
  • 48. SERVER PROCESSES  Oracle Database creates server processes to h dl th t f li t t d handle the requests of client processes connected to the instance  A client process always communicates with a database through a separate server process database through a separate server process.
  • 49. DEDICATED SERVER PROCESSES  In dedicated server connections, the client connection is associated with one and only one server process server process  Each client process communicates directly with its server process server process  This server process is dedicated to its client process for the duration of the session. process for the duration of the session.
  • 50. SHARED SERVER PROCESSES  In shared server connections, client applications connect over a network to a dispatcher process, not a server process a server process  The dispatcher process receives requests from connected clients and puts them into a request connected clients and puts them into a request queue in the large pool  The first available shared server process takes the  The first available shared server process takes the request from the queue and processes it.  shared server place the result into the dispatcher p p response queue
  • 51. BACKGROUND PROCESSES  Mandatory Background Processes  Optional Background Processes  Slave Processes
  • 52. MANDATORY BACKGROUND PROCESSES  The mandatory background processes are present in all typical database configurations Process Monitor Process (PMON)  Process Monitor Process (PMON)  System Monitor Process (SMON)  Database Writer Process (DBWn)  Database Writer Process (DBWn)  Log Writer Process (LGWR)  Checkpoint Process (CKPT) p ( )  Manageability Monitor Processes (MMON and MMNL)  Recoverer Process (RECO)