1 / 32

Oracle Architecture

Oracle Architecture. Or why Access is not a “real” database. Objectives. Describe the Oracle7 Server architecture Understand what is involved in administering a database Understand how to create a complete database. DBA Duties. Understand the Oracle Server Architecture

tallis
Download Presentation

Oracle Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oracle Architecture Or why Access is not a “real” database

  2. Objectives • Describe the Oracle7 Server architecture • Understand what is involved in administering a database • Understand how to create a complete database

  3. DBA Duties • Understand the Oracle Server Architecture • Design & create the database • Start up & shut down the database • Back up & restore the database • Enroll & monitor users • Manage database storage • Grant database privileges

  4. Oracle Server Architecture Objectives • Define the Oracle Server components • Distinguish between user & server processes • Define the background processes

  5. Overview Background Processes Server Processes System Global Area User Processes

  6. System Global Area (SGA) Components SGA Database Buffer Cache Redo Log Buffer Shared Pool

  7. System Global Area (SGA) Components The Shared Pool Dictionary Cache Library Cache Text of Statement Parsed Form of Statement Execution Plan

  8. System Global Area (SGA) Components The Database Buffer Cache

  9. System Global Area (SGA) Components The Redo Log Buffer

  10. System Global Area (SGA) Components SGA Database Buffer Cache Redo Log Buffer Shared Pool

  11. Overview Background Processes Server Processes System Global Area User Processes

  12. Database Writer - DBWR Log Writer - LGWR Checkpoint - CKPT System Monitor - SMON Process Monitor - PMON Archiver - ARCH Recoverer - RECO Lock - LCKn Snapshot Refresh - SNPn Shared Server - Snnn Dispatcher - Dnnn Parallel Query Pnnn Background Processes

  13. Mandatory Background Processes • PMON • SMON • DBWR • LGWR • If any of these 4 processes fail, the instance will crash, & it will have to be restarted.

  14. PMON & SMON Processes PMON SMON SGA Redo Log Buffer Shared Pool Database Buffer Cache

  15. PMON • Cleans up abnormally terminated connections • Rolls back uncommitted transactions • Releases locks held by a terminated process • Frees SGA resources allocated to the failed processes • Restarts failed shared server & dispatcher processes

  16. SMON • Performs automatic instance recovery • Reclaims space used by temporary segments no longer in use • Merges contiguous areas of free space in the datafiles

  17. RECO, LCKn, Pnnn, & SNPn Processes • The RECO process resolves failure involving a distributed transaction • The LCKn process performs inter-instance locking in a parallel server system • The Pnnn process provides parallel query, index creation, data loading, & Create Table As Select capabilities

  18. RECO, LCKn, Pnnn, & SNPn Processes Continued • The SNPn process performs automatic refreshes of snapshots (read-only replicated tables). It is also responsible for the server job queues & replication queues.

  19. DBWR Process • Manages the database buffer cache so that server processes can always find free buffers • Writes all changed buffers to datafiles • Uses a LRU algorithm to keep most recently used blocks in memory • Defers writes for I/O optimization

  20. LGWR, ARCH, & CKPT Processes • LGWR - Writes redo log entries to disk • ARCH - Copies online redo log files to a designated storage device once LGWR switches to a new group • CKPT - Ensures that all modified database buffers are written to the database files

  21. Overview Background Processes Server Processes System Global Area User Processes

  22. User Processes - used when a user runs an application program Runs the program & is considered the client Passes SQL to the server process & receives the results Server Processes - must place the data in the database buffer cache Parse & execute SQL statements Read data blocks from disk into the shared database buffers Return the results of SQL statements to the user process User & Server Processes

  23. An Oracle Instance • The combination of the SGA & the database background processes. • An instance is started (memory is allocated & the background processes are started) & then a database (datafiles) is mounted by the instance. • The server processes & user processes are not defined as part of an Oracle instance.

  24. An Oracle Database • Composed of 1 or more control files, datafiles, & redo log files • Datafiles - Contain all the database data • Redo log files - Hold records of all changes made to the database for recovery purposes • Control files - Record the physical structure & the status of the database

  25. Redo Log Files • Also referred to as groups • Are written in a circular fashion • There must be at least 2 redo log groups • Should be placed on the fastest & least loaded I/O device • May be multiplexed • The same data is written to every member of the same group • Each member of a group should be located on a different disk to guard against failure

  26. Redo Log Files Log Files Member A Group 1 Group 2 Group 3 Log Files Member B Group 1 Group 2 Group 3

  27. Control Files • All necessary database files & log files are identified in the control file • The name of the database is stored in the control file • A control file is required to mount, open, & access the database • Synchronized information needed for recovery is stored there • The recommended configuration is a minimum of 2 control files on different disks

  28. The Parameter File • A text file containing a list of instance configuration parameters • How much memory to use for memory structures in the SGA • What to do with filled online redo log files • The names & locations of the database’s control files

  29. The Alert & Trace Files • Oracle uses the alert file as an alternative to displaying error messages on the console if an error occurs while an Oracle instance is running • If an internal error is detected by a server or background process the information is dumped to an associated trace file • It is important that the DBA check the alert file daily

  30. Summary • The SGA is a group of the following shared memory constructs • Shared Pool • Database buffer cache • Redo Log buffer • The background processes asynchronously perform distinct tasks on behalf of all database users • Server processes use shared memory to process SQL statements

  31. Summary - continued • User processes run the tool/application & exchange SQL statement processing with the server processes • An Oracle instance consists of the SGA & the background processes • An Oracle database contains all the datafiles, redo log files, & control files • Redo log files record all changes made to the database, & are used for data recovery

  32. Summary - continued • A control file describes the structure of the database & is needed to mount & open the database • A parameter file is used to size the SGA & locate the control files when starting up an Oracle instance • An alert file of a database is a chronological log of messages & errors

More Related