【文章內(nèi)容簡介】
r process that connects to an Oracle database. Stack space Session information sort area, cursor information SGA Shared SQL areas SGA Session information PGA Dedicated server Shared server Server process Shared SQL areas Stack space sort area, cursor information 20 Process Structure An Oracle process is a program that depending on its type can request information, execute a series of steps, or perform a specific task. Oracle takes advantage of various types of processes: ? User process: Started at the time a database user requests connection to the Oracle server ? Server process: Connects to the Oracle Instance and is started when a user establishes a session. ? Background process: Available when an Oracle instance is started 21 User Process A user process is a program that requests interaction with the Oracle server. ? It must first establish a connection. ? It does not interact directly with the Oracle server. Database user Server process User process Connection established 22 Server Process A server process is a program that directly interacts with the Oracle server. ? It fulfills calls generated and returns results. ? Can be dedicated or shared server. Connection established Session created Database user User process Oracle server Server process 23 Background Processes The relationship between the physical and memory structures is maintained and enforced by Oracle’s background processes. ? Mandatory background processes DBWn PMON CKPT LGWR SMON RECO ? Optional background processes ARCn LMON Snnn QMNn LMDn CJQ0 Pnnn LCKn Dnnn 24 Instance SGA Database buffer cache DBWn Control files Data files Redo log files Database Writer (DBWn) DBWn writes when: ? Checkpoint ? Dirty buffers threshold reached ? No free buffers ? Timeout ? RAC ping request ? Tablespace offline ? Tablespace read only ? Table DROP or TRUNCATE ? Tablespace BEGIN BACKUP Database 25 Instance SGA DBWn Redo log buffer Log Writer (LGWR) LGWR writes: ? At mit ? When onethird full ? When there is 1 MB of redo ? Every 3 seconds ? Before DBWn writes Control files Data files Redo log files LGWR Database 26 Instance SGA SMON System Monitor (SMON) Responsibilities: ? Instance recovery: – Rolls forward changes in the redo logs – Opens the database for user access – Rolls back unmitted transactions ? Coalesces free space ever 3 sec ? Deallocates temporary segments Control files Data files Redo log files SMONDatabase 27 Instance SGA PMON Process Monitor (PMON) Cleans up after failed processes by: ? R