Oracle Architecture. Overview



Similar documents
ORACLE INSTANCE ARCHITECTURE

Oracle9i DBA Fundamentals I

Oracle server: An Oracle server includes an Oracle Instance and an Oracle database.

Module 3: Instance Architecture Part 1

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Self Tuning of Oracle Database Using SQL Scripts

Oracle DBA Course Contents

Oracle Database 11g: Administration Workshop I

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

Enterprise DBA Part 1A: Architecture and Administration

- An Oracle9i RAC Solution

Topics Advanced PL/SQL, Integration with PROIV SuperLayer and use within Glovia

ArcSDE Configuration and Tuning Guide for Oracle. ArcGIS 8.3

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

Backup Types. Backup and Recovery. Categories of Failures. Issues. Logical. Cold. Hot. Physical With. Statement failure

Oracle 11g DBA Training Course Content

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

TUTORIAL WHITE PAPER. Application Performance Management. Investigating Oracle Wait Events With VERITAS Instance Watch

The Oracle Universal Server Buffer Manager

What's the Point of Oracle Checkpoints? Harald van Breederode Oracle University 29-OCT-2009

Oracle Database Creation for Perceptive Process Design & Enterprise

Oracle and Sybase, Concepts and Contrasts

Oracle Database Architecture Overview

Introduction to SQL Tuning. 1. Introduction to SQL Tuning SkillBuilders, Inc. SKILLBUILDERS

Recovery algorithms are techniques to ensure transaction atomicity and durability despite failures. Two main approaches in recovery process

Outline. Failure Types

Oracle Database 10g: Administration Workshop II Release 2

Monitoreo de Bases de Datos

Oracle Database Security and Audit

AV-004: Administering and Programming with ORACLE

Oracle Database Links Part 2 - Distributed Transactions Written and presented by Joel Goodman October 15th 2009

Technical Paper Yet Another Performance Profiling Method (Or YAPP-Method)

RESEARCH ON SPATIAL DATABASE DESIGN AND TUNING BASED ON ORACLE AND ARCSDE

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

Recovery Principles in MySQL Cluster 5.1

<Insert Picture Here> RMAN Configuration and Performance Tuning Best Practices

Oracle Redo Log Performance Issues and Solutions

DBMaster. Backup Restore User's Guide P-E5002-Backup/Restore user s Guide Version: 02.00

Database Extension 1.5 ez Publish Extension Manual

Recovery and the ACID properties CMPUT 391: Implementing Durability Recovery Manager Atomicity Durability

How To Recover From A Crash On An Orgsoorora Database

Oracle 11g Database Administration

Oracle Database 12c: Performance Management and Tuning NEW

Lessons Learned while Pushing the Limits of SecureFile LOBs. by Jacco H. Landlust. zondag 3 maart 13

Many DBA s are being required to support multiple DBMS s on multiple platforms. Many IT shops today are running a combination of Oracle and DB2 which

Oracle EXAM - 1Z Oracle Database 11g Release 2: SQL Tuning. Buy Full Product.

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy

Enterprise DBA Part 1B: Backup and Recovery Workshop

1Z0-117 Oracle Database 11g Release 2: SQL Tuning. Oracle

System Administration of Windchill 10.2

Oracle Database 11g: Administration Workshop I

LOGGING OR NOLOGGING THAT IS THE QUESTION

If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows:

Module 15: Monitoring

Module 2: Database Architecture

D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Oracle Backup and Recover 101. Osborne Press ISBN

6. Backup and Recovery 6-1. DBA Certification Course. (Summer 2008) Recovery. Log Files. Backup. Recovery

Oracle Database 10g: Backup and Recovery 1-2

SQL Server Transaction Log from A to Z

Oracle Database: SQL and PL/SQL Fundamentals NEW

COURCE TITLE DURATION. Oracle Database 11g: Administration Workshop I

VERITAS Database Edition for Oracle on HP-UX 11i. Performance Report

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

Toad for Oracle 8.6 SQL Tuning

Restoring Microsoft SQL Server 7 Master Databases

Running a Workflow on a PowerCenter Grid

Oracle 11g Administration

FairCom c-tree Server System Support Guide

ORACLE DATABASE 11G: COMPLETE

SQL DATABASE PROGRAMMING (PL/SQL AND T-SQL)

Oracle Database Capacity Planning. Krishna Manoharan

Basic Tuning Tools Monitoring tools overview Enterprise Manager V$ Views, Statistics and Metrics Wait Events

DBACockpit for Oracle. Dr. Ralf Hackmann SAP AG - CoE EMEA Tech Appl. Platf. DOAG St. Leon-Rot 02. July 2013

1. This lesson introduces the Performance Tuning course objectives and agenda

OLTP Meets Bigdata, Challenges, Options, and Future Saibabu Devabhaktuni

HP POLYSERVE SOFTWARE

Oracle Database 11g: Administration And Backup & Recover

Oracle Enterprise Manager

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

Database Administration with MySQL

Oracle(PL/SQL) Training

Monitoring PostgreSQL database with Verax NMS

Sivakumar Software Engg, Zagro Singapore Pte Ltd .

Nimsoft Monitor. oracle Guide. v4.5 series

NetIQ AppManager for Oracle RDBMS on UNIX or Linux Servers Management Guide

Oracle Recovery Manager

Encrypting MySQL data at Google. Jonas Oreland and Jeremy Cole

Oracle Database 11g: SQL Tuning Workshop Release 2

COS 318: Operating Systems

Database 10g Edition: All possible 10g features, either bundled or available at additional cost.

ORACLE DATABASE 12C: NEW FEATURES FOR ADMINISTRATORS GRADE CURRICULAR. Enterprise Manager Express home page versus Enterprise Manager Database Control

IBM DB2: LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Transcription:

Oracle Architecture Overview

The Oracle Server Oracle ser ver

Instance Architecture Instance SGA Shared pool Database Cache Redo Log Library Cache Data Dictionary Cache DBWR LGWR SMON PMON ARCn RECO CKPT LCKn SNPn Dnnn Snnn

Instance An Oracle instance: Is a means to access an Oracle database Always opens one and only one database Consists of: Internal memory structures Processes

Interaction with the Database ( Dedicated Server ) CKPT SMON PMON SGA Shared SQL Pool Database Cache Redo log Request Response Dedicated Server DBWR LGWR ARCn User Process Database Files Redo Log Files

Interaction with the Database ( Shared Server ) CKPT SMON PMON SGA Shared SQL Pool Database Cache Redo log Request Response Dedicated Dedicated Server Shared Server Servers DBWR LGWR ARCn Dispatcher User Process User User Process Process User User Process Process Database Files Redo Log Files

Internal Memory Structures SGA System or shared Global Area (SGA) Database buffer cache Redo log buffer Shared pool Request & response queues (shared server)

Database 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

Least 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

Redo Log 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

Shared 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

Least 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

Internal 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

Background 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

Background 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

Commit 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)

Background 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

Background 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

Background 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

Background 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

Background 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

Background 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

Background 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

Background Processes - ARCH Automatically copies online redo log files to designated storage once they have become full

Server 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

User 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

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log 2 UPDATE table SET user = SHIPERT WHERE id = 12345 Dedicated Server 1 User Process DBWR LGWR Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log Dedicated Server 3 DBWR LGWR User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log 4 Dedicated Server DBWR LGWR User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA 5 Redo Log Dedicated Server DBWR LGWR User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool 6 Database Cache SGA Redo Log Dedicated Server DBWR LGWR User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA 7 Redo Log Dedicated Server DBWR LGWR User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log Dedicated Server DBWR LGWR 1 ROW UPDATED 8 User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log Dedicated Server DBWR LGWR COMMIT 9 10 User Process Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log Dedicated Server DBWR LGWR COMMIT SUCCESSFUL User Process 11 Database Files Redo Log Files

Transaction Example - Update CKPT SMON PMON Rollback Segment Shared Pool Database Cache SGA Redo Log 12 DBWR LGWR Database Files Redo Log Files