Oracle Architectural Components
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
The Oracle Server Application/ network server Server Users
Connecting to a Database Server process Client Server Oracle server User process User
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
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
Oracle Instance An Oracle instance: SGA Background processes An Oracle instance: Is a means to access an Oracle database Always opens one and only one database
Oracle Database Database Control files Parameter file Data files Redo log files Password file Archived log files Database
Other Key Physical Structures Parameter file Password file Archived log files Database
Processing a Query Parse Execute Fetch User process Server process Statement Handle Execute SELECT * FROM emp ORDER BY ename; Handle Fetch OK OK Results User process Server process
The Shared Pool Size defined by SHARED_POOL_SIZE 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
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
Program Global Area (PGA) Server process Not shared and not writable Contains Sort area Session information Cursor state Stack space
Processing a DML Statement 3 UPDATE emp SET sal=sal*1.1 WHERE empno=7369 Instance SGA Shared pool Library cache Redo log buffer Database buffer cache Data dictionary cache 4 5 Server process 2 1 Control files Redo log files Data files Database
Rollback Segment Old image New image Table Rollback segment DML statement
Redo Log Buffer Size defined by LOG_BUFFER Records changes made through the instance Used sequentially Circular buffer
Database Writer (DBWR) Instance SGA Shared pool DBWR Database buffer cache Data files Control files Redo log files
Log Writer (LGWR) Instance SGA Shared pool Redo log buffer LGWR Data files Control files Redo log files
COMMIT Processing 1 4 3 2 Server process User process Instance SGA Shared pool Server process Database buffer cache Redo log buffer 4 2 3 LGWR User process Control files Redo log files Data files Database
Summary Instance SGA Database Server process User process Shared pool DBWR LGWR Server process PGA User process Parameter file Control files Data files Archived log files Redo log files Password file Database