logging in or signing up Oracle Instance Architecture cat123 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 890 Category: Entertainment License: All Rights Reserved Like it (2) Dislike it (0) Added: July 14, 2010 This Presentation is Public Favorites: 1 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Oracle Instance Architecture : Oracle Instance Architecture Raj Gupta. (OCP) DBA Consultant. OracleArchitecture : OracleArchitecture Overview Oracle ArchitectureThe Oracle Server : Oracle ArchitectureThe Oracle Server Oracle ArchitectureInstance Architecture : Oracle ArchitectureInstance Architecture Oracle ArchitectureInstance : Oracle ArchitectureInstance An Oracle instance: Is a means to access an Oracle database Always opens one and only one database Consists of: Internal memory structures Processes Oracle ArchitectureInteraction with the Database ( Dedicated Server ) : Oracle ArchitectureInteraction with the Database ( Dedicated Server ) Oracle ArchitectureInteraction with the Database ( Shared Server ) : Oracle ArchitectureInteraction with the Database ( Shared Server ) Oracle ArchitectureInternal Memory Structures SGA : Oracle ArchitectureInternal Memory Structures SGA System or ‘shared’ Global Area (SGA) Database buffer cache Redo log buffer Shared pool Request & response queues (shared server) Oracle ArchitectureDatabase buffer cache : Oracle ArchitectureDatabase buffer cache Used to hold data blocks read from datafiles by server processes Contains ‘dirty’ or modified blocks and ‘clean’ or unused or unchanged bocks ‘Dirty’ and ‘clean’ blocks are managed in lists called the dirty list and the LRU Free space is created by DBWR writing out ‘dirty’ blocks or aging out blocks from the LRU Size is managed by the parameter DB_BLOCK_BUFFERS Oracle ArchitectureLeast Recently Used (LRU) : Oracle ArchitectureLeast Recently Used (LRU) LRU and the database buffer cache Every time a data block is read from disk it is placed in the database buffer cache at the head of the LRU list If a block is already in the cache and it is read again it is moved to the head of the list Data not used frequently is ‘aged’ out of the cache while frequently used data remains Oracle ArchitectureRedo Log Buffer : Oracle ArchitectureRedo Log Buffer A circular buffer that contains redo entries Redo entries reflect changes made to the database Redo entries take up contiguous, sequential space in the buffer Data stored in the redo log buffer is periodically written to the online redo log files Size is managed by the parameter LOG_BUFFER Default is 4 times the maximum data block size for the operating system Oracle ArchitectureShared Pool : Oracle ArchitectureShared Pool Consists of multiple smaller memory areas Library cache Shared SQL area Contains parsed SQL and execution plans for statements already run against the database Procedure and package storage Dictionary cache Names of all tables and views in the database Names and datatypes of columns in the database tables Privileges of all users Managed via an LRU algorithm Size determined by the parameter SHARED_POOL_SIZE Oracle ArchitectureLeast Recently Used (LRU) : Oracle ArchitectureLeast Recently Used (LRU) LRU and the shared pool Every time a SQL statement is parsed it is placed in the shared pool for reuse If a SQL statement is already in the shared pool it will not re-parse but it is placed at the head of the LRU SQL statements not used frequently are ‘aged’ out of the shared pool while frequently used statements remain A SQL statement may be artificially retained at the head of the LRU by ‘pinning’ the statement Oracle ArchitectureInternal Memory Structures PGA : Oracle ArchitectureInternal Memory Structures PGA Program or ‘process’ Global Area (PGA) Used for a single process Not shareable with other processes Writable only by the server process Allocated when a process is created and deallocated when a process is terminated Contains: Sort area – Used for any sorts required by SQL processing Session information – Includes user privileges Cursor state – Indicates stage of SQL processing Stack space – Contains session variables Oracle ArchitectureBackground Processes - DBWR : Oracle ArchitectureBackground Processes - DBWR Writes contents of database buffers to datafiles Primary job is to keep the database buffer ‘clean’ Writes least recently used (LRU) ‘dirty’ buffers to disk first Writes to datafiles in optimal batch writes Only process that writes directly to datafiles Mandatory process Oracle ArchitectureBackground Processes - DBWR : Oracle ArchitectureBackground Processes - DBWR DBWR writes to disk when: A server process cannot find a clean reusable buffer A timeout occurs (3 sec) A checkpoint occurs DBWR cannot write out ‘dirty’ buffers before they have been written to the online redo log files Oracle ArchitectureCommit Command : Oracle ArchitectureCommit Command The SQL command COMMIT allows users to save transactions that have been made against a database. This functionality is available for any UPDATE, INSERT, or DELETE transaction; it is not available for changes to database objects (such as ALTER TABLE commands) Oracle ArchitectureBackground Processes - LGWR : Oracle ArchitectureBackground Processes - LGWR Writes contents of redo log buffers to online redo log files Primary job is to keep the redo log buffer ‘clean’ Writes out redo log buffer blocks sequentially to the redo log files May write multiple redo entries per write during high utilization periods Mandatory process Oracle ArchitectureBackground Processes - LGWR : Oracle ArchitectureBackground Processes - LGWR LGWR writes to disk when: A transaction is COMMITED A timeout occurs (3 sec) The redo log buffer is 1/3 full There is more than 1 megabyte of redo entries Before DBWR writes out ‘dirty’ blocks to datafiles Oracle ArchitectureBackground Processes - SMON : Oracle ArchitectureBackground Processes - SMON Performs automatic instance recovery Reclaims space used by temporary segments no longer in use Merges contiguous areas of free space in the datafiles (if PCTINCREASE > 0) SMON ‘wakes up’ regularly to check whether it is needed or it may be called directly Mandatory process Oracle ArchitectureBackground Processes - SMON : Oracle ArchitectureBackground Processes - SMON SMON recovers transactions marked as DEAD within the instance during instance recovery All non committed work will be rolled back by SMON in the event of server failure SMON makes multiple passes through DEAD transactions and only applies a specified number of undo records per pass, this prevents short transactions having to wait for long transactions to recover SMON primarily cleans up server-side failures Oracle ArchitectureBackground Processes - PMON : Oracle ArchitectureBackground Processes - PMON Performs automatic process recovery Cleans up abnormally terminated connections Rolls back non committed transactions Releases resources held by abnormally terminated transactions Restarts failed shared server and dispatcher processes PMON ‘wakes up’ regularly to check whether it is needed or it may be called directly Mandatory process Oracle ArchitectureBackground Processes - PMON : Oracle ArchitectureBackground Processes - PMON Detects both user and server aborted database processes Automatically resolves aborted processes PMON rolls back the current transaction of the aborted process Releases resources used by the process If the process is a background process the instance most likely cannot continue and will be shut down PMON primarily cleans up client-side failures Oracle ArchitectureBackground Processes - CKPT : Oracle ArchitectureBackground Processes - CKPT Forces all modified data in the SGA to be written to datafile Occurs whether or not the data has been committed CKPT does not actually write out buffer data only DBWR can write to the datafiles Updates the datafile headers This ensures all datafiles are synchronized Helps reduce the amount of time needed to perform instance recovery Frequency can be adjusted with parameters Oracle ArchitectureBackground Processes - ARCH : Oracle ArchitectureBackground Processes - ARCH Automatically copies online redo log files to designated storage once they have become full Oracle ArchitectureServer Processes : Oracle ArchitectureServer Processes Services a single user process in the dedicated server configuration or many user processes in the shared server configuration Use an exclusive PGA Include the Oracle Program Interface (OPI) Process calls generated by the client Return results to the client in the dedicated server configuration or to the dispatcher in the shared server configuration Oracle ArchitectureUser Processes : Oracle ArchitectureUser Processes Run on the client machine Are spawned when a tool or an application is invoked SQL*Plus, Server Manager, Oracle Enterprise Manager, Developer/2000 Custom applications Include the User Program Interface (UPI) Generate calls to the Oracle server Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update UPDATE table SET user = ‘SHIPERT’ WHERE id = 12345 Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update 1 ROW UPDATED Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update COMMIT Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update COMMIT SUCCESSFUL Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
Oracle Instance Architecture cat123 Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 890 Category: Entertainment License: All Rights Reserved Like it (2) Dislike it (0) Added: July 14, 2010 This Presentation is Public Favorites: 1 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Oracle Instance Architecture : Oracle Instance Architecture Raj Gupta. (OCP) DBA Consultant. OracleArchitecture : OracleArchitecture Overview Oracle ArchitectureThe Oracle Server : Oracle ArchitectureThe Oracle Server Oracle ArchitectureInstance Architecture : Oracle ArchitectureInstance Architecture Oracle ArchitectureInstance : Oracle ArchitectureInstance An Oracle instance: Is a means to access an Oracle database Always opens one and only one database Consists of: Internal memory structures Processes Oracle ArchitectureInteraction with the Database ( Dedicated Server ) : Oracle ArchitectureInteraction with the Database ( Dedicated Server ) Oracle ArchitectureInteraction with the Database ( Shared Server ) : Oracle ArchitectureInteraction with the Database ( Shared Server ) Oracle ArchitectureInternal Memory Structures SGA : Oracle ArchitectureInternal Memory Structures SGA System or ‘shared’ Global Area (SGA) Database buffer cache Redo log buffer Shared pool Request & response queues (shared server) Oracle ArchitectureDatabase buffer cache : Oracle ArchitectureDatabase buffer cache Used to hold data blocks read from datafiles by server processes Contains ‘dirty’ or modified blocks and ‘clean’ or unused or unchanged bocks ‘Dirty’ and ‘clean’ blocks are managed in lists called the dirty list and the LRU Free space is created by DBWR writing out ‘dirty’ blocks or aging out blocks from the LRU Size is managed by the parameter DB_BLOCK_BUFFERS Oracle ArchitectureLeast Recently Used (LRU) : Oracle ArchitectureLeast Recently Used (LRU) LRU and the database buffer cache Every time a data block is read from disk it is placed in the database buffer cache at the head of the LRU list If a block is already in the cache and it is read again it is moved to the head of the list Data not used frequently is ‘aged’ out of the cache while frequently used data remains Oracle ArchitectureRedo Log Buffer : Oracle ArchitectureRedo Log Buffer A circular buffer that contains redo entries Redo entries reflect changes made to the database Redo entries take up contiguous, sequential space in the buffer Data stored in the redo log buffer is periodically written to the online redo log files Size is managed by the parameter LOG_BUFFER Default is 4 times the maximum data block size for the operating system Oracle ArchitectureShared Pool : Oracle ArchitectureShared Pool Consists of multiple smaller memory areas Library cache Shared SQL area Contains parsed SQL and execution plans for statements already run against the database Procedure and package storage Dictionary cache Names of all tables and views in the database Names and datatypes of columns in the database tables Privileges of all users Managed via an LRU algorithm Size determined by the parameter SHARED_POOL_SIZE Oracle ArchitectureLeast Recently Used (LRU) : Oracle ArchitectureLeast Recently Used (LRU) LRU and the shared pool Every time a SQL statement is parsed it is placed in the shared pool for reuse If a SQL statement is already in the shared pool it will not re-parse but it is placed at the head of the LRU SQL statements not used frequently are ‘aged’ out of the shared pool while frequently used statements remain A SQL statement may be artificially retained at the head of the LRU by ‘pinning’ the statement Oracle ArchitectureInternal Memory Structures PGA : Oracle ArchitectureInternal Memory Structures PGA Program or ‘process’ Global Area (PGA) Used for a single process Not shareable with other processes Writable only by the server process Allocated when a process is created and deallocated when a process is terminated Contains: Sort area – Used for any sorts required by SQL processing Session information – Includes user privileges Cursor state – Indicates stage of SQL processing Stack space – Contains session variables Oracle ArchitectureBackground Processes - DBWR : Oracle ArchitectureBackground Processes - DBWR Writes contents of database buffers to datafiles Primary job is to keep the database buffer ‘clean’ Writes least recently used (LRU) ‘dirty’ buffers to disk first Writes to datafiles in optimal batch writes Only process that writes directly to datafiles Mandatory process Oracle ArchitectureBackground Processes - DBWR : Oracle ArchitectureBackground Processes - DBWR DBWR writes to disk when: A server process cannot find a clean reusable buffer A timeout occurs (3 sec) A checkpoint occurs DBWR cannot write out ‘dirty’ buffers before they have been written to the online redo log files Oracle ArchitectureCommit Command : Oracle ArchitectureCommit Command The SQL command COMMIT allows users to save transactions that have been made against a database. This functionality is available for any UPDATE, INSERT, or DELETE transaction; it is not available for changes to database objects (such as ALTER TABLE commands) Oracle ArchitectureBackground Processes - LGWR : Oracle ArchitectureBackground Processes - LGWR Writes contents of redo log buffers to online redo log files Primary job is to keep the redo log buffer ‘clean’ Writes out redo log buffer blocks sequentially to the redo log files May write multiple redo entries per write during high utilization periods Mandatory process Oracle ArchitectureBackground Processes - LGWR : Oracle ArchitectureBackground Processes - LGWR LGWR writes to disk when: A transaction is COMMITED A timeout occurs (3 sec) The redo log buffer is 1/3 full There is more than 1 megabyte of redo entries Before DBWR writes out ‘dirty’ blocks to datafiles Oracle ArchitectureBackground Processes - SMON : Oracle ArchitectureBackground Processes - SMON Performs automatic instance recovery Reclaims space used by temporary segments no longer in use Merges contiguous areas of free space in the datafiles (if PCTINCREASE > 0) SMON ‘wakes up’ regularly to check whether it is needed or it may be called directly Mandatory process Oracle ArchitectureBackground Processes - SMON : Oracle ArchitectureBackground Processes - SMON SMON recovers transactions marked as DEAD within the instance during instance recovery All non committed work will be rolled back by SMON in the event of server failure SMON makes multiple passes through DEAD transactions and only applies a specified number of undo records per pass, this prevents short transactions having to wait for long transactions to recover SMON primarily cleans up server-side failures Oracle ArchitectureBackground Processes - PMON : Oracle ArchitectureBackground Processes - PMON Performs automatic process recovery Cleans up abnormally terminated connections Rolls back non committed transactions Releases resources held by abnormally terminated transactions Restarts failed shared server and dispatcher processes PMON ‘wakes up’ regularly to check whether it is needed or it may be called directly Mandatory process Oracle ArchitectureBackground Processes - PMON : Oracle ArchitectureBackground Processes - PMON Detects both user and server aborted database processes Automatically resolves aborted processes PMON rolls back the current transaction of the aborted process Releases resources used by the process If the process is a background process the instance most likely cannot continue and will be shut down PMON primarily cleans up client-side failures Oracle ArchitectureBackground Processes - CKPT : Oracle ArchitectureBackground Processes - CKPT Forces all modified data in the SGA to be written to datafile Occurs whether or not the data has been committed CKPT does not actually write out buffer data only DBWR can write to the datafiles Updates the datafile headers This ensures all datafiles are synchronized Helps reduce the amount of time needed to perform instance recovery Frequency can be adjusted with parameters Oracle ArchitectureBackground Processes - ARCH : Oracle ArchitectureBackground Processes - ARCH Automatically copies online redo log files to designated storage once they have become full Oracle ArchitectureServer Processes : Oracle ArchitectureServer Processes Services a single user process in the dedicated server configuration or many user processes in the shared server configuration Use an exclusive PGA Include the Oracle Program Interface (OPI) Process calls generated by the client Return results to the client in the dedicated server configuration or to the dispatcher in the shared server configuration Oracle ArchitectureUser Processes : Oracle ArchitectureUser Processes Run on the client machine Are spawned when a tool or an application is invoked SQL*Plus, Server Manager, Oracle Enterprise Manager, Developer/2000 Custom applications Include the User Program Interface (UPI) Generate calls to the Oracle server Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update UPDATE table SET user = ‘SHIPERT’ WHERE id = 12345 Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update 1 ROW UPDATED Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update COMMIT Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update COMMIT SUCCESSFUL Oracle ArchitectureTransaction Example - Update : Oracle ArchitectureTransaction Example - Update