7 Copyright © Oracle Corporation, 2002. All rights reserved. Instance and Media Recovery Structures.

Slides:



Advertisements
Similar presentations
1 Copyright © 2008, Oracle. All rights reserved. Database Architecture and ASM.
Advertisements

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.
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.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Backup and Recovery Part 1.
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)
7 Maintaining Redo Log Files. 7-2 Objectives Explaining the use of online redo log files Obtaining log and archive information Controlling log switches.
Using RMAN to Perform Recovery
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
Oracle Documentation Oracle DBA Course (9i, 10g, 11g) Lecture 1: Oracle Architectural Components.
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
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
DBMS Transactions and Rollback Recovery Helia / Martti Laiho.
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.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
7202ICT – Database Administration
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.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
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.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
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.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
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.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
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.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
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.
Copyright  Oracle Corporation, All rights reserved. 3 Oracle Backup and Recovery Configuration.
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.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
Maintaining Online Redo Log Files
Instance and Media Recovery Structures
Oracle Architectural Components
Index Index.
Chapter 5 The Redo Log Files.
Presentation transcript:

7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures

7-2 Copyright © Oracle Corporation, All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe the Oracle processes, memory structures, and files relating to recovery Identify the importance of checkpoints, redo log files, and archived log files Describe ways to tune instance recovery

7-3 Copyright © Oracle Corporation, All rights reserved. Overview Database Datafile 1 Datafile 2 Datafile 3 Control file Redo log file 1 Redo log file 2 Instance SGA Redo log buffer Database buffer cache Large PoolJava Pool Shared pool Data dict. cache Shared SQL and PL/SQL ARCn User process Server process PGA Parameter file Password file Archived log files PMON DBWnSMON LGWRCKPT

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

7-5 Copyright © Oracle Corporation, All rights reserved.

7-6 Copyright © Oracle Corporation, All rights reserved. Large Pool Can be configured as a separate memory area in the SGA to be used for: –Oracle backup and restore operations –I/O server processes –Session memory for the shared servers Is sized by the LARGE_POOL_SIZE parameter

7-7 Copyright © Oracle Corporation, All rights reserved.

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

7-9 Copyright © Oracle Corporation, All rights reserved. Database Buffer Cache, DBWn, and Data files Instance SGA Database buffer cache Large poolJava pool Shared pool Data dict. cache Shared SQL and PL/SQL ARCn User process Server process PGA Database Datafile 1 Datafile 2 Datafile 3 Control file Redo log file 1 Redo log file 2 Parameter file Password file Archived log files PMON DBW0SMON LGWRCKPT DBW1 Redo log buffer

7-10 Copyright © Oracle Corporation, All rights reserved.

7-11 Copyright © Oracle Corporation, All rights reserved. Redo Log Buffer, LGWR, and Redo Log Files Instance SGA Database buffer cache Large poolJava pool Shared pool Data dict. cache Shared SQL and PL/SQL ARCn User process Server process PGA Database Datafile 1 Datafile 2 Datafile 3 Control file Redo log file 1 Redo log file 2 Parameter file Password file Archived log files PMONSMON LGWRCKPT Redo log buffer DBWn

7-12 Copyright © Oracle Corporation, All rights reserved.

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

7-14 Copyright © Oracle Corporation, All rights reserved. Group 1 log1a.rdo log1b.rdo Group 2 log2a.rdo log2b.rdo Group 3 Multiplexed Redo Log Files Disk 1 (Member a) Disk 2 (Member b) log3a.rdo log3b.rdo

7-15 Copyright © Oracle Corporation, All rights reserved.

7-16 Copyright © Oracle Corporation, All rights reserved. Redo Log Files in Enterprise Manager

7-17 Copyright © Oracle Corporation, All rights reserved. Database Checkpoints Checkpoints are used to determine where recovery should start Checkpoint position - where recovery starts Checkpoint queue - link list of dirty blocks

7-18 Copyright © Oracle Corporation, All rights reserved. Types of Checkpoints Full checkpoint –All dirty buffers are written – SHUTDOWN NORMAL, IMMEDIATE, or TRANSACTIONAL – ALTER SYSTEM CHECKPOINT Incremental checkpoint (Fast-Start checkpoint) –Periodic writes –Only write the oldest blocks Partial checkpoint –Dirty buffers belonging to the tablespace – ALTER TABLESPACE BEGIN BACKUP – ALTER TABLESPACE tablespace OFFLINE NORMAL

7-19 Copyright © Oracle Corporation, All rights reserved. CKPT Process Instance SGA Database buffer cache Large poolJava pool Shared pool Data dict. cache Shared SQL and PL/SQL ARCn User process Server process PGA Database Datafile 1 Datafile 2 Datafile 3 Control file Redo log file 1 Redo log file 2 Parameter file Password file Archived log files PMONSMON LGWRCKPT Redo log buffer DBWn

7-20 Copyright © Oracle Corporation, All rights reserved. Multiplexed Control Files Instance SGA Database buffer cache Large poolJava pool Shared pool Data dict. cache Shared SQL and PL/SQL ARCn User process Server process PGA Database Datafile 1 Datafile 2 Datafile 3 Redo log file 1 Redo log file 2 Parameter file Password file Archived log files PMON DBWnSMON LGWRCKPT Control files Redo log buffer

7-21 Copyright © Oracle Corporation, All rights reserved.

7-22 Copyright © Oracle Corporation, All rights reserved. Control Files in Enterprise Manager

7-23 Copyright © Oracle Corporation, All rights reserved. ARCn Process and Archived Log Files Instance SGA Database buffer cache Large poolJava pool Shared pool Data dict. cache Shared SQL and PL/SQL ARC0 User process Server process PGA Database Datafile 1 Datafile 2 Datafile 3 Control file Redo log file 1 Redo log file 2 Password file Archived log files dest 1 PMON DBWnSMON LGWRCKPT Parameter file Password file Archived log files dest 2 ARC1 Redo log buffer

7-24 Copyright © Oracle Corporation, All rights reserved.

7-25 Copyright © Oracle Corporation, All rights reserved. Database Synchronization All datafiles (except offline and read-only) must be synchronized for the database to open. Synchronization is based on the current checkpoint number. Applying changes recorded in the redo log files synchronizes datafiles. Redo log files are automatically requested by the Oracle server.

7-26 Copyright © Oracle Corporation, All rights reserved. Database Datafile 1 Undo Datafile Datafile 3 Control file Redo log file 1 Redo log file Phases for Instance Recovery 1. Datafiles out-of-synch 2.Roll forward (redo) 3.Committed and non- committed data in files 4.Roll back (undo) 5.Committed data in files SQL*Plus Server process PGA Undo Checkpoint Instance SGA Redo log buffer Database buffer cache Large poolJava pool Shared pool Data dict. cache Shared SQL and PL/SQL ARCn PMON DBWnSMON LGWRCKPT

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

7-28 Copyright © Oracle Corporation, All rights reserved. Tuning Crash and Instance Recovery Performance Tuning the duration of instance and crash recovery Tuning the phases of instance recovery

7-29 Copyright © Oracle Corporation, All rights reserved. Tuning the Duration of Instance and Crash Recovery Methods to keep the duration of instance and crash recovery within user-specified bounds: Set initialization parameters to influence the number of redo log records and data blocks involved in recovery. Size the redo log file to influence checkpointing frequency. Issue SQL statements to initiate checkpoints. Parallelize instance recovery operations.

7-30 Copyright © Oracle Corporation, All rights reserved. Initialization Parameters Influencing Checkpoints Parameter FAST_START_MTTR_TARGET LOG_CHECKPOINT_TIMEOUT LOG_CHECKPOINT_INTERVAL Definition Expected MTTR specified in seconds Amount of time that has passed since the incremental checkpoint at the position where the last write to the redo log occurred Number of redo log file blocks that can exist between an incremental checkpoint and the last block written to the redo log

7-31 Copyright © Oracle Corporation, All rights reserved.

7-32 Copyright © Oracle Corporation, All rights reserved. Controlling Instance Crash Recovery Time

7-33 Copyright © Oracle Corporation, All rights reserved. V$INSTANCE_RECOVERY Used to monitor the mechanisms that are available to limit recovery I/O Statistics from this view to calculate which parameter has the greatest influence on checkpointing

7-34 Copyright © Oracle Corporation, All rights reserved.

7-35 Copyright © Oracle Corporation, All rights reserved. Tuning the Phases of Crash and Instance Recovery Tuning the roll forward phase Tuning the rollback phase

7-36 Copyright © Oracle Corporation, All rights reserved. Tuning the Rolling Forward Phase Parallel block recovery RECOVERY_PARALLELISM specifies the number of concurrent recovery processes

7-37 Copyright © Oracle Corporation, All rights reserved. Tuning the Rolling Back Phase Fast-start on-demand rollback Fast-start parallel rollback

7-38 Copyright © Oracle Corporation, All rights reserved. Fast-Start On-Demand Rollback Server process encountering data to be rolled back performs the following: Rolls back the block containing the required row Hands off further recovery, which may be in parallel, to SMON Improved response

7-39 Copyright © Oracle Corporation, All rights reserved. Fast-Start Parallel Rollback SMON Undo segment Tables P001 P000 P002 P003

7-40 Copyright © Oracle Corporation, All rights reserved. Controlling Fast-Start Parallel Rollback FAST_START_PARALLEL_ROLLBACK parameter Value FALSE LOW (default) HIGH Maximum Parallel Recovery Servers None 2 * CPU_COUNT 4 * CPU_COUNT

7-41 Copyright © Oracle Corporation, All rights reserved. Monitoring Parallel Rollback V$FAST_START_SERVERS : Provides information about all the recovery slaves performing parallel transaction recovery V$FAST_START_TRANSACTIONS : Contains information about the progress of the transactions that Oracle is recovering

7-42 Copyright © Oracle Corporation, All rights reserved.

7-43 Copyright © Oracle Corporation, All rights reserved. Summary In this lesson, you should have learned how to: Identify components of the instance and database that are significant to recovery Tune crash and instance recovery

7-44 Copyright © Oracle Corporation, All rights reserved. Practice 7 Overview This practice covers the following topics: Querying dynamic performance views to determine the current state and structure of the database Explaining the use of specific initialization parameters Mirroring of the control files and redo log files

7-45 Copyright © Oracle Corporation, All rights reserved. Practice 7

7-46 Copyright © Oracle Corporation, All rights reserved. Practice 7