ORACLE INSTANCE ARCHITECTURE



Similar documents
Module 3: Instance Architecture Part 1

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

Oracle Architecture. Overview

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

Oracle Database 11g: Administration Workshop I

- An Oracle9i RAC Solution

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/-

AV-004: Administering and Programming with ORACLE

ORACLE DATABASE 11G: COMPLETE

Oracle9i DBA Fundamentals I

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

Oracle Database Security and Audit

Oracle Database 11g: Performance Tuning DBA Release 2

Oracle 11g Database Administration

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

Module 14: Scalability and High Availability

Oracle Database 12c: Performance Management and Tuning NEW

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

HP POLYSERVE SOFTWARE

Oracle Database 11g: Administration Workshop I Release 2

ORACLE DATABASE: ADMINISTRATION WORKSHOP I

Oracle Database 11g: Administration Workshop I Release 2

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

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

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Administration Workshop I Release 2. 5 Jours [35 Heures]

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Performance Tuning DBA Release 2. 5 Jours [35 Heures]

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Information Technology Department Government of Sindh

Oracle Architecture, Concepts & Facilities

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

Oracle and Sybase, Concepts and Contrasts

Oracle 11g DBA Training Course Content

ORACLE DBA 11G TRAINING

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led

System Administration of Windchill 10.2

Self Tuning of Oracle Database Using SQL Scripts

Oracle Database 10g: New Features for Administrators

About the Author About the Technical Contributors About the Technical Reviewers Acknowledgments. How to Use This Book

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Oracle DBA Course Contents

Oracle Database 11g: Administration And Backup & Recover

Module 15: Monitoring

Oracle Database 11g: Administration Workshop I

Oracle Database 12c: Administration Workshop NEW

Enterprise DBA Part 1B: Backup and Recovery Workshop

MS-40074: Microsoft SQL Server 2014 for Oracle DBAs

Oracle Database 10g: Backup and Recovery 1-2

How To Manage An Sap Solution

Oracle 11g: RAC and Grid Infrastructure Administration Accelerated R2

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

Proactive database performance management

Running a Workflow on a PowerCenter Grid

Oracle Database 12c: Administration Workshop NEW. Duration: 5 Days. What you will learn

Oracle Database 12c: Performance Management and Tuning NEW

Oracle Big Data, In-memory, and Exadata - One Database Engine to Rule Them All Dr.-Ing. Holger Friedrich

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

Oracle9i Release 2 Database Architecture on Windows. An Oracle Technical White Paper April 2003

ORACLE CORE DBA ONLINE TRAINING

Oracle Database 10g: Administration Workshop II Release 2

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

Oracle Database 10g: Performance Tuning 12-1

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Administration Workshop II - LVC. 5 Jours [35 Heures]

Direct NFS - Design considerations for next-gen NAS appliances optimized for database workloads Akshay Shah Gurmeet Goindi Oracle

The Oracle Universal Server Buffer Manager

WSO2 Business Process Server Clustering Guide for 3.2.0

Oracle Database 11g: Administration Workshop II DBA Release 2

How To Manage An Orgs Server 10G (Operating System)

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

Tushar Joshi Turtle Networks Ltd

Enterprise DBA Part 1A: Architecture and Administration

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

Safe Harbor Statement

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

Configuring Backup Settings. Copyright 2009, Oracle. All rights reserved.

Oracle Database Architecture Overview

ITG Software Engineering

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Programa de Actualización Profesional ACTI Oracle Database 11g: SQL Tuning Workshop

Expert Oracle. Database Architecture. Techniques and Solutions. 10gr, and 11g Programming. Oracle Database 9/, Second Edition.

How To Recover From A Crash On An Orgsoorora Database

SAP NetWeaver Application Server architecture

Tier Architectures. Kathleen Durant CS 3200

Configuring Apache Derby for Performance and Durability Olav Sandstå

ORACLE DATABASE ADMINISTRATOR RESUME

Oracle Database 11g: Administration Workshop II

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Monitoreo de Bases de Datos

Database Services for CERN

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

Oracle Database 11g: New Features for Administrators DBA Release 2

Oracle Database 11g: Administration Workshop II DBA Release 2

Oracle Backup & Recovery

Oracle Database: SQL and PL/SQL Fundamentals NEW

XTM Web 2.0 Enterprise Architecture Hardware Implementation Guidelines. A.Zydroń 18 April Page 1 of 12

Transcription:

ORACLE INSTANCE ARCHITECTURE

ORACLE ARCHITECTURE Oracle Database Instance Memory Architecture Process Architecture Application and Networking Architecture 2

INTRODUCTION TO THE ORACLE DATABASE INSTANCE A database instance is a set of memory structures that manage database files Ad database is a set of physical lfiles on disk The instance manages its associated data and serves the users of the database Every running Oracle database is associated with at least one Oracle database instance Instance can exist without Database Database Can exist without instance

DATABASE INSTANCE STRUCTURE What happens When an instance is started, Oracle Database allocates a memory area called the system global area (SGA) Starts one or more background processes. The SGA serves various purposes, including the following:

DATABASE INSTANCE STRUCTURE What does SGA does Maintaining internal data structures that are accessed by many processes and threads concurrently Caching data blocks read from disk Buffering redo data before writing it to the online redo log files Storing SQL execution plans

DATABASE INSTANCE CONFIGURATIONS You can run Oracle Database in either of the following mutually exclusive configurations: Single-instance instance configuration A one-to-one relationship exists between the database and an instance Oracle Real Application Clusters (Oracle RAC) configuration one-to-many relationship exists between the database and instances

DATABASE INSTANCE CONFIGURATIONS Whether in a single-instance or Oracle RAC configuration, a database instance is associated with only one database at a time. You can start a database instance and mount (associate the instance with) one database, but not mount two databases simultaneously with the same instance Multiple instances can run concurrently on the same computer/ Server, each accessing its own database

DATABASE INSTANCE CONFIGURATIONS Duration of an Instance An instance begins when it is created with the STARTUP command and ends when it is terminated During this period, an instance can associate itself with g p, one and only one database

INSTANCE AND DATABASE STARTUP

DATABASE AND INSTANCE SHUTDOWN

SHUTDOWN MODES

CHECKPOINTS A checkpoint is a crucial mechanism in consistent database shutdowns, instance recovery, and Oracle Database operation Purpose of Checkpoints Reduce the time required for recovery in case of an instance or media failure Ensure that dirty buffers in the buffer cache are written to disk regularly Ensure that all committed data is written to disk during a consistent shutdown

INSTANCE RECOVERY Instance recovery is the process of applying records in the online redo log to data files to reconstruct changes made after the most recent checkpoint Instance recovery occurs automatically when an administrator attempts to open a database that was previously shut down inconsistently. Instance recovery ensures that the database is in a consistent state after an instance failure.

WHEN ORACLE DATABASE PERFORMS INSTANCE RECOVERY Whether instance recovery is required depends d on the state of the redo threads. A redo thread is marked open in the control file when a database instance opens in read/write mode, and is marked closed when the instance is shut down consistently. The database opens for the first time after the failure of a single-instance instance database or all instances of an Oracle RAC database Some but not all instances of an Oracle RAC database fail

PARAMETER FILES To start a database instance, Oracle Database must read either a server parameter file, which is recommended, or a text initialization parameter file, which is a legacy implementation. These files contain a list of configuration parameters

PARAMETER FILES Server Parameter Files A server parameter file is a repository for initialization parameters that is managed by Oracle Database. Characteristics of Server Parameter file. Only one server parameter file exists for a database The server parameter file is written to and read only by Oracle Database The server parameter file is binary file

PARAMETER FILES Text Initialization Parameter Files A text initialization parameter file is a text file that contains a list of initialization parameters. Characteristics of Text Initialization Parameter file. Reside on the same host A text initialization parameter file is text-based, not binary Oracle Database can read but not write to the text initialization parameter file

TRACE FILES A trace file is an administrative file that contain diagnostic data used to investigate problems

ORACLE DATABASE MEMORY STRUCTURES When an instance is started, Oracle Database allocates a memory area and starts background processes. The memory area stores information such as the following Program code Information about each connected session Information needed during program execution Information such as lock data that is shared and communicated among processes Cached data, such as data blocks and redo records, that also exists on disk

BASIC MEMORY STRUCTURES System global l area (SGA) The SGA is a group of shared memory structures, known as SGA components, that contain data and control information for one Oracle Database instance Program global area (PGA) A PGA is a nonshared memory region that contains data and control information exclusively for use by an Oracle process User Global Area (UGA) The UGA is memory associated with a user session. Software code areas Software code areas are portions of memory used to store code that is being run or can be run.

DATABASE MEMORY MANAGEMENT Memory management involves maintaining optimal sizes for the Oracle instance memory structures as demands on the database change Automatic memory management Automatic shared memory management Partially automated Manual memory management Instead of setting the total memory size individually set SGA and PGA memmory.

USER GLOBAL AREA The UGA is session memory Memory allocated for session variables logon information P/L SQL Package State.

PROGRAM GLOBAL AREA The PGA is memory specific to an operating process or thread that is not shared by other processes or threads on the system PGA is process specific it is never allocated in the PGA is process-specific, it is never allocated in the SGA.

CONTENTS OF THE PGA

CONTENTS OF THE PGA Private SQL Area The run-time area This area contains query execution state information The persistent area This area contains variable values A variable value is supplied to a SQL statement at run time when the statement is executed SQL Work Areas A work area is a private allocation of PGA memory used for memory-intensive operations.

SYSTEM GLOBAL AREA The SGA is a read/write memory area that, along with the Oracle background processes, make up a database instance All server processes that execute on behalf of users can read information in the instance SGA Each database instance has its own SGA.

SGA COMPONENTS The most important SGA components are the following Database Buffer Cache Redo Log Buffer Shared Pool Large Pool Java Pool Fixed SGA

DATABASE BUFFER CACHE The database buffer cache, also called the buffer cache, is the memory area that stores copies of data blocks read from data files. Why Buffer Cache Optimize physical I/O Keep frequently accessed blocks in the buffer cache and write infrequently accessed blocks to disk

BUFFER STATES The database uses internal algorithms to manage buffers in the cache A buffer can be in any of the following mutually exclusive states: Unused The buffer is available for use because it has never been used or is currently unused Clean This buffer was used earlier and now contains a readconsistent version of a block as of a point in time. Dirty The buffer contain modified data that has not yet been written to disk

REDO LOG BUFFER The redo log buffer is a circular buffer in the SGA that stores redo entries describing changes made to the database. Redo entries contain the information necessary to reconstruct, or redo, changes made to the database by DML or DDL operations. Database recovery applies redo entries to data files Database recovery applies redo entries to data files to reconstruct lost changes.

SHARED POOL The shared pool caches various types of program data Parsed SQL/PLSQL System Parameters Data dictionary Information.

LARGE POOL The large pool is an optional memory area intended for memory allocations that are larger than is appropriate for the shared pool UGA for the shared server where transactions interact with multiple databases Message buffers used in the parallel execution of statements Buffers for Recovery Manager (RMAN)

JAVA POOL The Java pool is an area of memory that stores all session-specific Java code and data within the Java Virtual Machine (JVM).

FIXED SGA The fixed SGA is an internal housekeeping area General information about the state of the database and the instance, which the background processes need to access Information communicated between processes, such as information about locks

PROCESS ARCHITECTURE

INTRODUCTION TO PROCESSES A process is a mechanism in an operating system that can run a series of steps All connected Oracle Database users must run the following modules to access a database instance Application or Oracle Database utility Oracle database code A process normally runs in its own private memory A process normally runs in its own private memory area

TYPES OF PROCESSES Client processes run the application Oracle tool code Oracle processes Run the Oracle database code Background processes start with the database instance perform maintenance tasks (instance recovery, cleaning up processes, writing redo buffers to disk.) Slave processes perform additional tasks for a background or server process

CLIENT PROCESSES When a user runs an application such as a Pro*C program or SQL*Plus, the operating system creates a client process (sometimes called a user process) to run the user application. The client application has Oracle Database libraries linked into it that provide the APIs required to communicate with the database.

CONNECTIONS AND SESSIONS Connection A connection is a physical communication pathway between a client process and a database instance A communication pathway is established using available interprocess communication mechanisms or network software

CONNECTIONS AND SESSIONS Session A session is a logical entity in the database instance memory that t represents the state t of a current user login to a database A single connection can have 0, 1, or more sessions established on it The sessions are independent: a commit in one session does not affect transactions in other sessions

SERVER PROCESSES Oracle Database creates server processes to handle the requests of client processes connected to the instance A client process always communicates with a database through a separate server process.

DEDICATED SERVER PROCESSES In dedicated server connections, the client connection is associated with one and only one server process Each client process communicates directly with its server process This server process is dedicated to its client process for the duration of the session.

SHARED SERVER PROCESSES In shared server connections, client applications connect over a network to a dispatcher process, not a server process The dispatcher process receives requests from connected clients and puts them into a request queue in the large pool The first available shared server process takes the request from the queue and processes it. shared server place the result into the dispatcher response queue

BACKGROUND PROCESSES Mandatory Background Processes Optional Background Processes Slave Processes

MANDATORY BACKGROUND PROCESSES The mandatory background processes are present in all typical database configurations Process Monitor Process (PMON) System Monitor Process (SMON) Database Writer Process (DBWn) Log Writer Process (LGWR) Checkpoint Process (CKPT) Manageability Monitor Processes (MMON and MMNL) Recoverer Process (RECO)