This document provides an overview of Oracle database architecture. It discusses that Oracle has two main components: the database and instance. The database contains physical and logical structures, while the instance resides in memory and contains the system global area (SGA) and background processes. It describes the various sub-components that make up the physical database, logical database, SGA, and background processes like SMON, DBWR, LGWR, and PMON. The document aims to provide a clear understanding of Oracle architecture.
2. DBA learning by presentation offered by
DBAMETRIX Solutions.
This all presentations have been prepared by
Gitesh P Trivedi.
Gitesh Trivedi has work excellent 14 years
experience in DBA field and as consultant
faculty.
For more details please contact to
www.dbametrix.com or gitesh@dbametrix.com
or giteshtrivedi@yahoo.com
3. There are two components of Oracle
Software.
First is Database component.
Second is Instance component.
There are lots of sub components attached
with these parent components.
In this chapter we will get depth study of
each component.
4.
5. There are 2 sub-components of Database
layout.
First called as Physical Structure of
Database.
Second called as Logical Structure of
Database.
Both sub-components have own properties.
Both sub-components have own
importance.
7. Physical database structure contains following
layouts.
Control files
Datafiles
Redo Log files
Parameter file (init.ora and spfile.ora)
Password file
Trace files (including alert.log)
Audit files (if sys audit is enabled in database).
All are equally important for database.
8.
9. There is no physical identity for logical
structure of database.
Schema
Tablespace
Segment
Extent
Oracle block
10.
11. Each database logically divides in to one or more
tablespaces.
Each tablespace consists with one or more physical
datafile.
Total size of datafiles in the database is the total size
of database.
Each tablespace contains one or more logical
segments.
Each segment contains with extents.
Each tablespace contains more than one extents.
Each extents contains contagious Oracle data blocks.
12. Tablespace contains
number of schema or
extents
Schema contains
number of segments
Segment contains No of
extents
Extent contains Oracle
cont. blocks
Oracle Data Block
13. Oracle data block is the finest unit of Oracle database.
Extent is made by contiguous oracle blocks.
Segment contains one or more extents.
Schema is made up by one or more segments.
Tablespace contains one or more schema.
Means logical tablespace divides in to logical Oracle data
blocks.
Logical tablespace contains one or more PHYSICAL
datafile.
Each Oracle data block occupies physical Operating
system’s block.
Actually finest physical unit is Operating System block.
14. Instance populates in Memory.
It consists with System Global Area and
background processes.
When Database starts Oracle server reads
parameter meter file for allocating SGA.
Sub-components of SGA and background
processes started called “instance started”.
Populated in memory region of server.
15. rrrrr Irrrrrrr
O
C
Log o
Buffer Cache Shared Pool n
Buffer
S
tr
Java Pool Large Pool Stream Pool
LGWR
16. At startup of database Oracle server reads
Parameter file for parameters about SGA’s sub-
components like buffer cache, log buffer, shared
pool, java pool etc.
It allocating granules for these all sub parts of SGA.
Simultaneously mandatory background processes
are started like SMON, DBWR, LGWR, CKPT, PMON.
If instance was crashed during past shutdown or
abnormal shutdown was performed then Instance
recovery will be enabling during Instance start.
Instance recovery held by SMON.
17. SMON is called System Monitor.
Performs Instance recovery.
Performs temporary segment allocation and
de-allocation.
Performs coal lesion of tablespace
fragmentations.
Mandatory background process for Instance.
If died or killed then Oracle instance will crash.
18. DBWR is called Database Writer.
Writes buffers from Database Buffer Cache to
datafiles.
May be one or more DBWR process available in
Database. Shadow process called slave process
can be configured.
More DBWR writes faster on disk.
When CKPT triggers, DBWR writes data dirty
buffers in to datafiles.
Maximum processes are available 20.
19. CKPT is called as Checkpoint process.
It triggers when empty buffers are needed in Buffer Cache.
It updates control file and data file’s header with system change no.
It is very useful for synchronization of data.
Types of ckpt are full checkpoint, fast checkpoint, local checkpoint and
global checkpoint.
During fast checkpoint it contains checkpoint queue which reflects in
controlfile and log buffer with respective SCN number.
It controls instance recovery time.
During redo log switch it also occurs.
We can perform manual checkpoint using command “alter system
checkpoint”
During shutdown normal, transactional, immediate it occurs.
During tablespace taking online or offline it also occurs.
It occurs while issuing command “alter system switch logfile”
20. LGWR is called as Log Writer Process.
It writes from Redo log buffer to Redo log files.
During commit operation, LGWR writes data
from log buffer to redo log file.
If log buffer is 1/3 full then also it flushes data
in to redo log file.
It writes data in to redo files every 3 sec.
It flushes data while DBWR singled.
Only one process is available.
21. PMON is called as Process Monitor.
It clears locks.
It clears resource of dead user process.
It wakes up periodically (every 3 seconds) and
pings every user process connection for
housekeeping.
It registers connection between dispatcher and
instance to listener in MTS server.
It clears up and rollback uncommitted
transactions.
22.
23. Oracle Server has 2 primary components.
Called Database and Instance.
Both part contains 2 sub components.
Physical and Logical are sub-parts of Database.
SGA and Background processes are sub-parts
of Instance.
All part has own characteristic & importance.
After clearing this, learning of DBA becomes
very easy.
24. Oracle Architecture in Nutshell
1Z0-042 Oracle Administration I
Chapter-2
Prepared by Gitesh Trivedi
gitesh@www.dbametrix.com