Professional Documents
Culture Documents
SQL
Network (LAN)
ORACLE_HOME DB
( Files )
Instance Production
Production DBA
DATABASE
INSTANCE
Collection of 3
files
SGA (SYSTEM GLOBAL AREA / SHARED GLOBAL BACKGROUND
AREA) PROCESS 1.Controlfile
2.Redo log file
3.Datafile
MANDATORY OPTIONAL
MEMORY MEMORY
COMPONENTS COMPONENTS
1.JAVA POOL(8i)
1. DATABASE BLOCK BUFFERS (OR )
2.LARGE POOL(8i) Mandatory Optional
DB_CACHE
3.STREAMS POOL(10g) Background Background
2. REDO LOG BUFFER CACHE Process Process
3. SHARED POOL
1.SMON 1.RECO
2.PMON 2.CJQO
3.LGWR 3.OPQO
4.DBWO
DATA DICTIONARY 5.ARCH
LIBRARY CACHE
CACHE 6.CKPT
TYPE MIN/MAX CARRIERS MULTIPLEX
SIZE
OF FILE
THE CRUCIAL
MIN 1
1.CONTROL FILES INFORMATION OF KB/MB Y
MAX 8
[3] DATABASE
Y
2.REDO 2 KB/MB
LOG LATEST TX
FILES
ACTUAL DATA.
3.DATAFILES 1.Upto 9i TABLES/INDEX N
GB/TB
2.From 10g
ADDITIONAL BACKGROUND PROCESSES FROM 10g
The files that constitute an Oracle database are organized into the following:
Control files: Contain data about the database itself (that is, physical
database structure information). These files are critical to the database.
Without them, you cannot open data files to access the data within the
database.
Data files: Contain the user or application data of the database
Online redo log files: Allow for instance recovery of the database. If the
database crashes and does not lose any data files, then the instance can
recover the database with the information in these files.
The following additional files are important to the successful running of the
database:
Parameter file: Is used to define how the instance is configured when it
starts up
Password file: Allows users to connect remotely to the database and
perform administrative tasks
Backup files: Are used for database recovery. You typically restore a backup
file when a media failure or user error has damaged or deleted the original
file.
Archive log files: Contain an ongoing history of the data changes (redo) that
are generated by the instance. Using these files and a backup of the
database, you can recover a lost data file. That is, archive logs enable the
recovery of restored data files.
DATABASE STRUCTURE
Stores current SCN in
Redo Log Control Files
BUFFER Buffer
CACHE
W.S
Control Files
DBWR LGWR
Log Member States
UNUSED
Updates
Header CURRENT
with
SCN
ACTIVE
Control Files
CKPT
DBWR LGWR
Log Member States
UNUSED
Updates
Header CURRENT
with
SCN
ACTIVE
Control Files
CKPT
DBWR LGWR
Log Member States
Updates
Header CURRENT
with
SCN
ACTIVE
Control Files
CKPT
DBWR LGWR
Log Member States
Updates
Header CURRENT
with
SCN
ACTIVE
Archive
Stores current SCN in
Redo Log Control Files
BUFFER Buffer
CACHE
Control Files
CKPT
DBWR LGWR
Log Member States
UNUSED
Updates
Header CURRENT
with
SCN
ARCH ACTIVE
Archive
Stores current SCN in
Redo Log Control Files
BUFFER Buffer
CACHE
Control Files
CKPT
DBWR LGWR
Log Member States
Updates
Header CURRENT
with
SCN
ACTIVE
Control Files
CKPT
DBWR LGWR
Log Member States
Updates
Header CURRENT
with
SCN
ACTIVE
Archive
Stores current SCN in
Redo Log Control Files
BUFFER Buffer
CACHE
Control Files
CKPT
DBWR LGWR
Log Member States
UNUSED
Updates
Header CURRENT
with
SCN
ARCH ACTIVE
Archive
Stores current SCN in
Redo Log Control Files
BUFFER Buffer
CACHE
Control Files
CKPT
DBWR LGWR
Log Member States
UNUSED
Updates
Header CURRENT
with
SCN
ARCH ACTIVE
Archive
Oracle Architecture with File System
How the Oracle Database Works
The following example describes the most basic level of operations that the
Oracle database performs. This illustrates an Oracle configuration where
the user and associated server processes are on separate computers
(connected through a network).
STEPS
3. The instance detects the connection request from the application and
connects to a server process on behalf of the user process.
6. The server process retrieves any necessary data values from the actual
data file (table) or from data blocks that are stored in the SGA.
9. The DBWn process writes modified blocks to the disk when doing so is
efficient.
10. The server process sends a success or error message across the
network to the application.
Processing SQL
TEMP
Tablespace
Group-1
Control
USER USER Group-2
Files
DATA INDEX
Tablespace Tablespace
Group-3
UNDO
Tablespace
SQL Statistics
User Oracle + EP
User Program Server
Process Process Intstance
Interface
Valid Parse
SQL
Statement
Library
Data Block Cache
Buffer
Fetch
~ ~ SP
I/O Data
Dictionary
Cache
BT
EP
UserData02.dbf
d1.dbf
LOG WRITER Details
SMON
Library
Data Block Cache
Buffer ICR -
Instance
DBWR ~ ~
Data
SP
Crash
Recovery
Dictionary
Cache
BT
LGWR
Log
Switch
TX - 1 TX – 3 Continued
TX - 2 TX - 4
TX - 3 TX - 5
1 2
Redo Log
Files
Oracle Architecture
Transaction Example - Update
UPDATE table
SET user = ‘RAJESH’
WHERE id = 12345
Oracle Architecture
Transaction Example - Update
Oracle Architecture
Transaction Example - Update
Oracle Architecture
Transaction Example - Update
Oracle Architecture
Transaction Example - Update
Oracle Architecture
Transaction Example - Update
Oracle Architecture
Transaction Example - Update
1 ROW UPDATED
Oracle Architecture
Transaction Example - Update
COMMIT
Oracle Architecture
Transaction Example - Update
COMMIT
SUCCESSFUL
Oracle Architecture
Transaction Example - Update
Oracle Architecture
Transaction Example - Update