Download Unit Four

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
1
Oracle Architectural
Components
Copyright  Oracle Corporation, 1998. All rights reserved.
Objectives
• Listing the structures involved in
connecting a user to an Oracle server
• Listing the stages in processing a query
• Listing the stages in processing a DML
statement
• Listing the stages in processing
COMMITS
1-2
Copyright  Oracle Corporation, 1998. All rights reserved.
The Oracle Server
Oracle server
Application/
network
server
Server
1-3
Copyright  Oracle Corporation, 1998. All rights reserved.
Users
Connecting to a Database
Client
User
process
Server
process
Server
Oracle server
User
1-4
Copyright  Oracle Corporation, 1998. All rights reserved.
User Process
• Runs on the client machine
• Is spawned when a tool or an application
is invoked
• Runs the tool or application (SQL*Plus,
Server Manager, Oracle Enterprise
Manager, Developer/2000)
• Includes the User Program Interface (UPI)
• Generates calls to the Oracle server
1-5
Copyright  Oracle Corporation, 1998. All rights reserved.
Server Process
• Runs on the server machine (host)
• Services a single user process in the
dedicated server configuration
• Uses an exclusive PGA
• Includes the Oracle Program Interface
(OPI)
• Processes calls generated by the client
• Returns results to the client
1-6
Copyright  Oracle Corporation, 1998. All rights reserved.
Oracle Instance
Instance
SGA
Background processes
An Oracle instance:
• Is a means to access an Oracle
database
• Always opens one and only one
database
1-7
Copyright  Oracle Corporation, 1998. All rights reserved.
Oracle Database
Control
files
Parameter
file
Password
file
Data files
Redo log
files
Database
1-8
Copyright  Oracle Corporation, 1998. All rights reserved.
Archived
log files
Other Key Physical Structures
Parameter
file
Password
file
1-9
Database
Copyright  Oracle Corporation, 1998. All rights reserved.
Archived
log files
Processing a Query
SELECT *
FROM emp
ORDER BY ename;
Statement
Handle
Handle
User
process
Server
process
Results
OK
OK
Parse
1-10
Execute
Copyright  Oracle Corporation, 1998. All rights reserved.
Fetch
The Shared Pool
Shared pool
Library
cache
Data
dictionary
cache
• Size defined by SHARED_POOL_SIZE
• Library cache contains statement text,
parsed code, and an execution plan
• Data dictionary cache contains table
and column definitions and privileges
1-11
Copyright  Oracle Corporation, 1998. All rights reserved.
Database Buffer Cache
• Number of buffers defined by
DB_BLOCK_BUFFERS
• Size of a buffer based on DB_BLOCK_SIZE
• Stores the most recently used blocks
1-12
Copyright  Oracle Corporation, 1998. All rights reserved.
Program Global Area (PGA)
Server
process
PGA
• Not shared and not writable
• Contains
– Sort area
– Session information
– Cursor state
– Stack space
1-13
Copyright  Oracle Corporation, 1998. All rights reserved.
Processing a DML Statement
UPDATE emp
SET sal=sal*1.1
WHERE empno=7369
Server
process
3
Instance
SGA
4
5
Shared pool
Library
cache
Database
buffer
cache
Redo log
buffer
Data
dictionary
cache
2
1
1-14
Data files
Control
files
Database
Copyright  Oracle Corporation, 1998. All rights reserved.
Redo log
files
Rollback Segment
Old
image
New
image
Table
Rollback
segment
DML
statement
1-15
Copyright  Oracle Corporation, 1998. All rights reserved.
Redo Log Buffer
• Size defined by LOG_BUFFER
• Records changes made through the
instance
• Used sequentially
• Circular buffer
1-16
Copyright  Oracle Corporation, 1998. All rights reserved.
Database Writer (DBWR)
Instance
SGA
Shared pool
Database
buffer
cache
DBWR
Data files
1-17
Control
files
Redo log
files
Copyright  Oracle Corporation, 1998. All rights reserved.
Log Writer (LGWR)
Instance
SGA
Shared pool
Redo log
buffer
LGWR
Data files
1-18
Control
files
Redo log
files
Copyright  Oracle Corporation, 1998. All rights reserved.
COMMIT Processing
1
Instance
SGA
Server
process
4
Database
buffer
cache
Shared pool
Redo log
buffer
LGWR
3
2
User
process
Data files
Control
files
Database
1-19
Copyright  Oracle Corporation, 1998. All rights reserved.
Redo log
files
Summary
Instance
SGA
Shared pool
Server
process
PGA
User
process
DBWR
Control
files
Parameter
file
Password
file
LGWR
Redo log
files
Data files
Database
1-20
Copyright  Oracle Corporation, 1998. All rights reserved.
Archived
log files
Related documents