Copyright © Oracle Corporation, 2002. All rights reserved. 1 Oracle Architectural Components.

Slides:



Advertisements
Similar presentations
The Architecture of Oracle
Advertisements

Introduction to Oracle
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Oracle Architectural Components
10 Copyright © 2006, Oracle. All rights reserved. Automatic Shared Memory Management.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Introduction History The principles of the relational model were first outlined by Dr. E.F Codd in a June 1970 paper is called “A Relational Model of Data.
Oracle Architecture. Database instance When a database is started the current state of the database is given by the data files, a set of background (BG)
IS 4510 – Database Administration Module – 1 Database Architecture 9/14/20141Compiled by: Zafar Iqbal Khan.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Oracle Overview and Architecture
Oracle Database Workshop 1 Presented to IBRI CAS 27-Nov-2011 By Abdullah Alkalbani.
Oracle Documentation Oracle DBA Course (9i, 10g, 11g) Lecture 1: Oracle Architectural Components.
OTHER DATABASE MODELS OTHER DATABASE MODELS The relational database is not the only database model in use today. Two other common models are distributed.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
7202ICT – Database Administration
Oracle9i Performance Tuning Chapter 2 Tuning the Buffer Cache.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
Outline Introduction to Oracle Memory Structures SGA, PGA, SCA The Specifics of the System Global Area (SGA) Structures Overview of Program Global Areas.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
11 Copyright © 2006, Oracle. All rights reserved. Checkpoint and Redo Tuning.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown President System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2003.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
Oracle9i Performance Tuning Chapter 4 Tuning the Shared Pool Memory.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
What is Oracle ? Oracle is a relational database management system. It is a management system which uses the relational data model. In the relational data.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
3 Copyright © Oracle Corporation, All rights reserved. 管理数据库事例.
Instance and Media Recovery Structures
Oracle Architectural Components
Introduction To Oracle 10g
Oracle Memory Internals
Oracle Architectural Components
Presentation transcript:

Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components

Copyright © Oracle Corporation, All rights reserved. 1-2 Objectives After completing this lesson, you should be able to do the following: Outline the Oracle architecture and its main components List the structures involved in connecting a user to an Oracle instance

Copyright © Oracle Corporation, All rights reserved. 1-3 Password file Overview of Primary Components Instance SGA Redo Log Buffer Shared Pool Data Dictionary Cache Library Cache DBWRSMONPMONCKPTLGWROthers User process Server process PGA Control files Data files Database Database Buffer Cache Redo Log files Java Pool Large Pool Parameter file Archived Log files

Copyright © Oracle Corporation, All rights reserved. 1-4

Copyright © Oracle Corporation, All rights reserved. 1-5 Oracle Server An Oracle server: Is a database management system that provides an open, comprehensive, integrated approach to information management Consists of an Oracle instance and an Oracle database Oracle server

Copyright © Oracle Corporation, All rights reserved. 1-6 Oracle Instance An Oracle instance: Is a means to access an Oracle database Always opens one and only one database Consists of memory and background process structures Background process structures Memory structures Instance SGA Redo Log Buffer Shared Pool Data Dictionary Cache Library Cache DBWRSMONPMONCKPTLGWROthers Database Buffer Cache Java Pool Large Pool

Copyright © Oracle Corporation, All rights reserved. 1-7 Establishing a Connection and Creating a Session Connecting to an Oracle instance: Establishing a user connection Creating a session Session created Database user User process Server process Connection established Oracle server

Copyright © Oracle Corporation, All rights reserved. 1-8

Copyright © Oracle Corporation, All rights reserved. 1-9 Oracle Database An Oracle database: Is a collection of data that is treated as a unit Consists of three file types Password file Parameter file Archived Log files Control files Data files Redo Log files Oracle Database

Copyright © Oracle Corporation, All rights reserved Physical Structure The physical structure includes three types of files: Control files Data files Online redo log files Control files Data files (includes Data Dictionary) Header Online Redo Log files

Copyright © Oracle Corporation, All rights reserved Memory Structure Oracle’s memory structure consists of two memory areas known as: System Global Area (SGA): Allocated at instance start up, and is a fundamental component of an Oracle instance Program Global Area (PGA): Allocated when the server process is started

Copyright © Oracle Corporation, All rights reserved System Global Area The SGA consists of several memory structures: –Shared Pool –Database Buffer Cache –Redo Log Buffer –Other structures (for example, lock and latch management, statistical data) There are two additional memory structures that can be configured within the SGA: –Large Pool –Java Pool

Copyright © Oracle Corporation, All rights reserved. 1-13

Copyright © Oracle Corporation, All rights reserved System Global Area Is dynamic Sized by the SGA_MAX_SIZE parameter Allocated and tracked in granules by SGA components –Contiguous virtual memory allocation –Granule size based on total estimated SGA_MAX_SIZE

Copyright © Oracle Corporation, All rights reserved Shared Pool Used to store: –Most recently executed SQL statements –Most recently used data definitions It consists of two key performance-related memory structures: –Library Cache –Data Dictionary Cache Sized by the parameter SHARED_POOL_SIZE Shared Pool Data Dictionary Cache Library Cache ALTER SYSTEM SET SHARED_POOL_SIZE = 64M;

Copyright © Oracle Corporation, All rights reserved Library Cache Stores information about the most recently used SQL and PL/SQL statements Enables the sharing of commonly used statements Is managed by a least recently used (LRU) algorithm Consists of two structures: –Shared SQL area –Shared PL/SQL area Size determined by the Shared Pool sizing

Copyright © Oracle Corporation, All rights reserved Data Dictionary Cache A collection of the most recently used definitions in the database Includes information about database files, tables, indexes, columns, users, privileges, and other database objects During the parse phase, the server process looks at the data dictionary for information to resolve object names and validate access Caching data dictionary information into memory improves response time on queries and DML Size determined by the Shared Pool sizing

Copyright © Oracle Corporation, All rights reserved Database Buffer Cache Stores copies of data blocks that have been retrieved from the data files Enables great performance gains when you obtain and update data Managed through an LRU algorithm DB_BLOCK_SIZE determines primary block size Database Buffer Cache

Copyright © Oracle Corporation, All rights reserved Database Buffer Cache Consists of independent subcaches: – DB_CACHE_SIZE – DB_KEEP_CACHE_SIZE – DB_RECYCLE_CACHE_SIZE Can be dynamically resized DB_CACHE_ADVICE set to gather statistics for predicting different cache size behavior Statistics displayed by V$DB_CACHE_ADVICE ALTER SYSTEM SET DB_CACHE_SIZE = 96M;

Copyright © Oracle Corporation, All rights reserved. 1-20

Copyright © Oracle Corporation, All rights reserved Redo Log Buffer Records all changes made to the database data blocks Primary purpose is recovery Changes recorded within are called redo entries Redo entries contain information to reconstruct or redo changes Size defined by LOG_BUFFER Redo Log Buffer

Copyright © Oracle Corporation, All rights reserved Large Pool An optional area of memory in the SGA Relieves the burden placed on the Shared Pool Used for: –Session memory (UGA) for the Shared Server –I/O server processes –Backup and restore operations or RMAN –Parallel execution message buffers PARALLEL_AUTOMATIC_TUNING set to TRUE Does not use an LRU list Sized by LARGE_POOL_SIZE Can be dynamically resized

Copyright © Oracle Corporation, All rights reserved. 1-23

Copyright © Oracle Corporation, All rights reserved Java Pool Services parsing requirements for Java commands Required if installing and using Java Sized by JAVA_POOL_SIZE parameter

Copyright © Oracle Corporation, All rights reserved Program Global Area Memory reserved for each user process connecting to an Oracle database Allocated when a process is created Deallocated when the process is terminated Used by only one process User process PGA Server process

Copyright © Oracle Corporation, All rights reserved. 1-26

Copyright © Oracle Corporation, All rights reserved. 1-27

Copyright © Oracle Corporation, All rights reserved Process Structure 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 processes: Started when an Oracle instance is started

Copyright © Oracle Corporation, All rights reserved User Process A program that requests interaction with the Oracle server Must first establish a connection Does not interact directly with the Oracle server Database user Server process User process Connection established

Copyright © Oracle Corporation, All rights reserved Server Process A program that directly interacts with the Oracle server Fulfills calls generated and returns results Can be dedicated or shared server Connection established Session created Database user User process Server process Oracle server

Copyright © Oracle Corporation, All rights reserved Background Processes Maintains and enforces relationships between physical and memory structures: Mandatory background processes: DBWnPMONCKPT LGWRSMON Optional background processes: ARCnLMDn QMNn CJQ0LMON RECO DnnnLMS Snnn LCKnPnnn

Copyright © Oracle Corporation, All rights reserved Database Writer (DBWn) DBWn writes when: Checkpoint occurs Dirty buffers reach threshold There are no free buffers Timeout occurs RAC ping request is made Tablespace OFFLINE Tablespace READ ONLY Table DROP or TRUNCATE Tablespace BEGIN BACKUP Instance SGA Control files Data files Redo Log files Database DBWn Database Buffer Cache

Copyright © Oracle Corporation, All rights reserved Log Writer (LGWR) LGWR writes: At commit When one-third full When there is 1 MB of redo Every three seconds Before DBWn writes Instance SGA Control files Data files Redo Log files Database Redo Log Buffer DBWnLGWR

Copyright © Oracle Corporation, All rights reserved System Monitor (SMON) Responsibilities: Instance recovery –Rolls forward changes in online redo log files –Opens database for user access –Rolls back uncommitted transactions Coalesces free space Deallocates temporary segments Control files Data files Redo Log files Database Instance SGA SMON

Copyright © Oracle Corporation, All rights reserved Process Monitor (PMON) Cleans up after failed processes by: Rolling back the transaction Releasing locks Releasing other resources Restarting dead dispatchers PGA area Instance SGA PMON

Copyright © Oracle Corporation, All rights reserved Checkpoint (CKPT) Responsible for: Signaling DBWn at checkpoints Updating datafile headers with checkpoint information Updating control files with checkpoint information Control files Data files Redo Log files Database Instance SGA DBWnLGWRCKPT

Copyright © Oracle Corporation, All rights reserved Archiver (ARCn) Optional background process Automatically archives online redo log files when ARCHIVELOG mode is set Preserves the record of all changes made to the database ARCn Archived redo log files Control files Data files Redo log files

Copyright © Oracle Corporation, All rights reserved. 1-38

Copyright © Oracle Corporation, All rights reserved Logical Structure Dictates how the physical space of a database is used Hierarchy consisting of tablespaces, segments, extents, and blocks Tablespace Datafile Segment BlocksExtent Segment

Copyright © Oracle Corporation, All rights reserved. 1-40

Copyright © Oracle Corporation, All rights reserved. 1-41

Copyright © Oracle Corporation, All rights reserved Processing SQL Statements Connect to an instance using: –User process –Server process The Oracle server components that are used depend on the type of SQL statement: –Queries return rows –DML statements log changes –Commit ensures transaction recovery Some Oracle server components do not participate in SQL statement processing.

Copyright © Oracle Corporation, All rights reserved. 1-43

Copyright © Oracle Corporation, All rights reserved Summary In this lesson, you should have learned how to: Explain database files: data files, control files, online redo log files Explain SGA memory structures: Database Buffer Cache, Shared Pool, and Redo Log Buffer Explain primary background processes: DBWn, LGWR, CKPT, PMON, SMON Explain the use of the optional background process ARCn Identify optional and conditional background processes Explain logical hierarchy

Copyright © Oracle Corporation, All rights reserved Practice 1 Overview This practice covers the following topics: Reviewing architectural components Identifying structures involved in connecting a user to an Oracle instance

Copyright © Oracle Corporation, All rights reserved. 1-46

Copyright © Oracle Corporation, All rights reserved. 1-47

Copyright © Oracle Corporation, All rights reserved. 1-48