200 likes | 406 Views
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. Oracle server. The Oracle Server.
E N D
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
Oracle server The Oracle Server Application/networkserver Server Users
Oracle server Connecting to a Database Serverprocess Client Server Userprocess 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
Instance SGA Oracle Instance An Oracle instance: • Is a means to access an Oracle database • Always opens one and only one database Background processes
Control files Data files Redo logfiles Oracle Database Parameterfile Archivedlog files Passwordfile Database
Parameterfile Passwordfile Archivedlog files Other Key Physical Structures Database
Statement Handle Handle Results OK OK • Parse • Execute • Fetch Processing a Query SELECT * FROM emp ORDER BY ename; Userprocess Serverprocess
Shared pool Librarycache Datadictionarycache The Shared Pool • 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) PGA Serverprocess • Not shared and not writable • Contains • Sort area • Session information • Cursor state • Stack space
3 Instance SGA 4 Shared pool Librarycache 5 Database buffercache Redo logbuffer Datadictionarycache 2 Control files Data files Redo logfiles 1 Database Processing a DML Statement UPDATE emp SET sal=sal*1.1 WHERE empno=7369 Serverprocess
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
Instance SGA Shared pool Database buffercache DBWR Data files Control files Redo logfiles Database Writer (DBWR)
Instance SGA Shared pool Redo logbuffer LGWR Data files Control files Redo logfiles Log Writer (LGWR)
1 4 3 2 Control files Data files Redo logfiles Database COMMIT Processing Instance SGA Shared pool Serverprocess Database buffercache Redo logbuffer LGWR Userprocess
Instance SGA Shared pool DBWR LGWR Control files Parameterfile Archivedlog files Redo logfiles Data files Passwordfile Summary Serverprocess PGA Userprocess Database