WELCOME TO DBA TECHNOLOGIES
ORACLE DATABASE
ARCHITECTURE-2

By
Mr. PRASAD
MYNUMPATI

18 Years Real Time in
INDIA-USA

www....
database Architecture – USER TS
•

USER tablespace is to store data
permanently

•

Entire Application data storage and re...
ORACLE & OS comparison
FILE SYSTEM

TABLESPACE

File system Partitions (ext3)

Tablespaces (Undo, Temp and Permanent)

Mou...
Server & Storage
configuration

•
• OS and ORACLE SW is on Server
Database is going to be on high end
– SAN
storage (Stora...
Identifying OS for
• ORACLE SW version
•
•
•
•

Need to follow certification matrix From oracle metalink.
www.metalink.ora...
Single DB vs. Multiple databases
•
•
•

Can we create multiple databases by using same
version of Oracle Software? Yes we ...
•

Instance and Database
– CPU
Instance will be hosted on server
–
–

MEM
PROCESS
ES
•Database (C,R,D files) is located on...
ORACLE INSTANCE
• BACKGROUND PROCESSES
• Mandate and Optional background process will be
• stated when INSTANCE starts
•

...
•

Mandate Background
Processes DBWn

Insta: Writes dirty buffers from
Buffer to fil
DBWn
SHAR
nce Cache DBF es
DATAB
ED
A...
•
•

Mandate Background
Processes DBWn an buff (mem
What is the betw blo (fil
DBWn : Writes only dirty buffers that are LR...
•

Types of
Buffers

Dirty
Buffers
•
Free
Buffers
•
Pinned
Buffers

i Buff Cac
n er he

DATABASE
BUFFER CACHE
•

Types of Buffers in
Buffer Cache
Dirty Buffers

•
•

that are buffer
writt t da fil
–Modified in
not yet
o ta es
cache(...
•
•

DBWn writes
when?

Dirty buffers threshold
When required free buffers
•
During
are available
•

n
ot

Any TS status c...
Mandate Background
• LGWR : Log writer writes change records
fro
Processes LGWR
redo buffers to redo log files
m

SHAR
ED
...
LGWR writes
when

•
•
•
At every commit
•
• Every three

seconds
When 1/3 full of redo log vect
– Change vector
•
Scn and
...
•

LG
WR

Server Process copy redo
• records from user
memory space (PGA) to
•
redo log buffers for every
• DML and DDL

V...
Mand background
LR
LR LR
ate process CKPT
SHARED
U
U
U
DATABASE
BUFFERMR MR
MR CACHE

DBWn

CK
PT

72
3

Cont fil
rol e

U...
Mandatevery critical background process to
background
Checkpoint is a
•process CHECKPOINT time
reduce the instance or medi...
•
•

Types of
checkpoint
Thread checkpoint :

– (database checkpoint)
Database writes to disk all buffers
– Consistent
mod...
Types of checkpoint

• TS and data file checkpoints:

– Tablespace checkpoint is with respect to
a particular table space ...
•

Types of checkpoint
Incremental checkpoints

– It is kind of thread checkpoint in order
to avoid large number of blocks...
•
•

Types of checkpoint
Incremental checkpoints

It is kind of thread checkpoint in
order to avoid large number of blocks...
Mandate background
process SMON

•
•
• SMON : System Monitor
•

Responsible for Instance crash
recovery (ICR)is applying r...
SM
ON
Cra
Recov
sh
ery
245 Control file

ICR SMON

INSTANCE
BUFFER CACHE

STARTUP
AFTER CRASH

24
5
24
5

Data
file 1
Data...
Mandate background
• process PMON
PMON : Processes
•Respon for Monitor
ade proces
sible
cleanin
ad ses
resourc g
User proc...
•
•

Mandate
REC
background transact iO
Responsible for
distrib
datab environ
resolving in-doubt
process Distribute ions n...
SQL statements ORACLE
PARSI
processing in DATABASE
Us
er
Pro
cess
SQL>
Select *
from
employee
s;

DATAB Server
SHAR
Proces...
SQL statements ORACLE
PARSI
processing in DATABASE
Us
er
p
Proc DB
Wn
ess
SQL>
Update
sal=20K
from
salary
where
sal=1
0K

...
Building career
with passion

QUESTION AND
ANSWER SESSION
DSNR:944 11 72
718/040-65555689
Upcoming SlideShare
Loading in...5
×

Oracle DBA Online Training: DBA Technologies

446

Published on

DBA T is pchnologies Provides Oracle DBA Online Training Class course by excellent experienced IT professionals who has more then 18+ Years of real time experience Our trainers has good training experience so that best quality output will be delivered. visit - http://www.dbatechnologies.net/

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
446
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Oracle DBA Online Training: DBA Technologies

  1. 1. WELCOME TO DBA TECHNOLOGIES ORACLE DATABASE ARCHITECTURE-2 By Mr. PRASAD MYNUMPATI 18 Years Real Time in INDIA-USA www.dbatechnologies.net www.dbatechnol ogies.net
  2. 2. database Architecture – USER TS • USER tablespace is to store data permanently • Entire Application data storage and retrieval from USER tablespaces For load balancing purpose we use different • • • tablespaces on different disks for INDEX and DATA How many tablespaces for a database? depends on design of the application and number of applications
  3. 3. ORACLE & OS comparison FILE SYSTEM TABLESPACE File system Partitions (ext3) Tablespaces (Undo, Temp and Permanent) Mount file system (To read and write) By default TS is mounted Files & Directories Tables , Indexes (objects) OS Block size TS Block size (Default 8K) Multi user access based on privileges Multi users access by assigned quota Backup FS Backup tablespace FS consistency (fsck) Database level consistency (RMAN)
  4. 4. Server & Storage configuration • • OS and ORACLE SW is on Server Database is going to be on high end – SAN storage (Storage area – NAS (Network Networks) area Storage)
  5. 5. Identifying OS for • ORACLE SW version • • • • Need to follow certification matrix From oracle metalink. www.metalink.oracle.com? What kind of OS we need Need to choose certified OS Can we install multiple versions (7,8,8i,9i,10g,11g) of Oracle SW on same server? Yes we can
  6. 6. Single DB vs. Multiple databases • • • Can we create multiple databases by using same version of Oracle Software? Yes we can One database vs. Multiple databases – Nature of applications • Dependency – Size of the database (maintenance) – Application Complexity … ..
  7. 7. • Instance and Database – CPU Instance will be hosted on server – – MEM PROCESS ES •Database (C,R,D files) is located on high end storage solutions like SAN with fiber optic technology. • Process power and memory for all Database operations are from server resources
  8. 8. ORACLE INSTANCE • BACKGROUND PROCESSES • Mandate and Optional background process will be • stated when INSTANCE starts • All the running background processes can be viewed –ef | grep $ORACLE_SID – $ps DATABASE LEVELlevels @ two different - SQL> Select PNAME From v$process Where PNAME • OS LEVEL is not null ORDER by PNAME; – $echo the available background process How to see all$ORACLE_SID (Instance details Name) – SQL>Select name from v$bgprocess;
  9. 9. • Mandate Background Processes DBWn Insta: Writes dirty buffers from Buffer to fil DBWn SHAR nce Cache DBF es DATAB ED ASE Redo buffers PO OL USER DATAFILE
  10. 10. • • Mandate Background Processes DBWn an buff (mem What is the betw blo (fil DBWn : Writes only dirty buffers that are LRU (Least recently difference een ck e) d er ory) Used Data Basebuffers) to dbf files and MRU Buffer Cache during CKPT (Memory) Dbf file Blocks : (Storage) Default Non default supported block Block Size 8K sizes: 2k,4k,16k,32k
  11. 11. • Types of Buffers Dirty Buffers • Free Buffers • Pinned Buffers i Buff Cac n er he DATABASE BUFFER CACHE
  12. 12. • Types of Buffers in Buffer Cache Dirty Buffers • • that are buffer writt t da fil –Modified in not yet o ta es cache(memory) en Free (storage) Buffers –Ready to use Pinned Buffers –Buffers that in use by Oracle
  13. 13. • • DBWn writes when? Dirty buffers threshold When required free buffers • During are available • n ot Any TS status change graceful/consistent • like (read only, shutdown offline or Tablespace Begin backup..)
  14. 14. Mandate Background • LGWR : Log writer writes change records fro Processes LGWR redo buffers to redo log files m SHAR ED Redo buffers PO OL DATAB ASE Current (In use) Active (Required for recovery Log Inactive (Ready to Switch be current) ) Redo log files
  15. 15. LGWR writes when • • • At every commit • • Every three seconds When 1/3 full of redo log vect – Change vector • Scn and buffers Time Stamp of change ors • contains • Transaction Id • When worth of committed Commit details if redo • • ( scn is 1MB recordsand timestamp) Type of operation What contains change Segment name and type Change vectors details
  16. 16. • LG WR Server Process copy redo • records from user memory space (PGA) to • redo log buffers for every • DML and DDL V$system_ - log file switch (event,total_waits, time_waited • LOG_BUFFER is the parameter to set redo log event completion and average_wait) buffers size. Min 64k. • Alert log file also records the above event check Log buffer space (v$session_wait) – wait event(in for checkpoint not complete seconds) indicates insufficient log buffers size
  17. 17. Mand background LR LR LR ate process CKPT SHARED U U U DATABASE BUFFERMR MR MR CACHE DBWn CK PT 72 3 Cont fil rol e U U Da file ta 1 72 U POOL REDO LOG BUFF ERS 72 3 72 3 723 3 Da file ta 2 Redo log files
  18. 18. Mandatevery critical background process to background Checkpoint is a •process CHECKPOINT time reduce the instance or media recovery Checkpoint wont write any data but in only • ensures marking SCN in Redo, Control file and data files – During checkpoint DBWn writes data to dbf files and • marks Redo, control file and data files with scn# • • Checkpointrecovery must startpointer where position (SCN) in redo is the from Checkpoint ensures all the dirty buffers to disk (LRU & MRU) Checkpoint position is the oldest dirty buffer in the database buffer cache
  19. 19. • • Types of checkpoint Thread checkpoint : – (database checkpoint) Database writes to disk all buffers – Consistent modified by redo in a specific thread, occurs during the following database shutdown situations system – Alter checkpoint
  20. 20. Types of checkpoint • TS and data file checkpoints: – Tablespace checkpoint is with respect to a particular table space during the status change like read only, read write, begin backup. Only for the data files that belongs to a TS
  21. 21. • Types of checkpoint Incremental checkpoints – It is kind of thread checkpoint in order to avoid large number of blocks at online redo log switches. • DBWn checks every 3 seconds to any work to do, if DBWn check writes dirty buffers, it advances the checkpoint
  22. 22. • • Types of checkpoint Incremental checkpoints It is kind of thread checkpoint in order to avoid large number of blocks at online redo log switches. • DBWn checks every 3 seconds to check any work to do, if DBWn writes dirty
  23. 23. Mandate background process SMON • • • SMON : System Monitor • Responsible for Instance crash recovery (ICR)is applying records from – Instance recovery Cleans up temporary segments. For example if redo index creation failed it recent checkpoint to dbf files after most cleans up all the temporary – Information from redo must be transferred segments. to What ismake it permanent and consistent dbf to ICR? –
  24. 24. SM ON Cra Recov sh ery 245 Control file ICR SMON INSTANCE BUFFER CACHE STARTUP AFTER CRASH 24 5 24 5 Data file 1 Data file 2 245 Data file 3 1.Rollforward 2.Rollback Committ (uncommitted txns) ed & Undo 3.24 Recovery done Data 5 file 1 SHARED POOL DATABASE un committ ed 24 5 Committ ed & un committ ed
  25. 25. Mandate background • process PMON PMON : Processes •Respon for Monitor ade proces sible cleanin ad ses resourc g User process Crash of es User process SG A PM ON
  26. 26. • • Mandate REC background transact iO Responsible for distrib datab environ resolving in-doubt process Distribute ions n uted ase ment. RECO : Recoverer REC O d txn Us er REC O
  27. 27. SQL statements ORACLE PARSI processing in DATABASE Us er Pro cess SQL> Select * from employee s; DATAB Server SHAR Processes ASE ED BUFFER PO CACHE OL REDO BUFFERS data file Execut ion Row source generation NG 1. Syntax check 2. Semantic check If 3.Shared so SP pool check ft che har ck d OPTIMI =n ZER o Multiple EP’s
  28. 28. SQL statements ORACLE PARSI processing in DATABASE Us er p Proc DB Wn ess SQL> Update sal=20K from salary where sal=1 0K Rows u dated DATAB Server SHAR Processes ASE 10 ED 10 10 BUFFER RED PO k k k 20 20 20 O CACHE OL BUFF k k k ERS Un data do User data file file Execut ion Row source generation NG 1. Syntax check 2. Semantic check If 3.Shared so SP pool check ft che har ck d OPTIMI =n ZER o Multiple EP’s
  29. 29. Building career with passion QUESTION AND ANSWER SESSION DSNR:944 11 72 718/040-65555689
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×