Anda di halaman 1dari 10

Oracle Database 11g: Backup and

Recovery Workshop
Student Guide

D71862GC10
Edition 1.0
March 2011
D72508

Authors

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Donna Keesling

Disclaimer

James Spiller

Technical Contributors
and Reviewers
Christopher D. Andrews
Maria Billings
Herbert Bradbury
Timothy Chien
Donna Cooksey
Pascal Daniel
Joe Fong
Gerlinde Frenzen
Mark Fuller
Joel Goodman
Uwe Hesse
Dominique Jeunot
Pete Jones
Gwen Lazenby
Deirdre Matishak
Veerabhadra Rao Putrevu
Ira Singer
Hironori Susuta
Branislav Valny
Anthony Woodell

Publisher
Sujatha Nagendra

This document contains proprietary information and is protected by copyright and


other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.
The information contained in this document is subject to change without notice. If you
find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is
applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners.

Contents

Preface
1

Introduction
Objectives 1-2
Assessing Your Recovery Requirements First Step in Data Protection Planning 1-3
Assessing Your Recovery Requirements 1-5
Categories of Failure 1-6
Data Failures 1-7
Oracle Data Protection Solutions 1-8
Backup and Recovery Foundation Complete Oracle Solution from Disk to Tape 1-9
Oracle Recovery Manager (RMAN) Integrated Backup and Recovery Engine 1-10
Oracle Secure Backup Enterprise Tape Backup Management 1-11
Oracle Secure Backup Cloud Module Offsite Database Backups in the Cloud 1-12
Oracle Data Guard Overview 1-13
Physical Standby Database: Redo Apply Architecture 1-15
Logical Standby Database: SQL Apply Architecture 1-16
Oracle Active Data Guard 1-17
Oracle Maximum Availability Architecture Robust & Integrated Data Protection 1-18
Quiz 1-19
Summary 1-20
Practice 1-1 Overview: Exploring the Oracle Virtual Machine Environment 1-21

Using Enterprise Manager and the RMAN Client


Objectives 2-2
Using Enterprise Manager for Backup and Recovery Operations 2-3
Using the RMAN Client 2-4
Types of RMAN Commands 2-5
Job Commands: Example 2-6
Configuring Persistent Settings for RMAN 2-7
Viewing Persistent Settings 2-8
Managing Persistent Settings 2-9
Specifying a Retention Policy 2-10
Quiz 2-12
Summary 2-13
Practice 2-1 Overview: Configuring the Default Backup Destination 2-14

iii

Practice 2-2 Overview: Setting the Date and Time Format for RMAN 2-15
Practice 2-3 Overview: Enabling Control File and SPFILE Autobackups 2-16
Practice 2-4 Overview: Configuring Backup Retention Policy 2-17
Practice 2-5 Overview: Configuring Devices for Backup 2-18
3

Configuring for Recoverability


Objectives 3-2
Using a Fast Recovery Area 3-3
Configuring the Fast Recovery Area 3-5
Sizing the Fast Recovery Area (FRA) 3-7
Fast Recovery Area Space Management 3-9
Multiplexing Control Files 3-11
Control File Autobackups 3-12
Redo Log Files 3-14
Multiplexing the Redo Log 3-15
Creating Archived Redo Log Files 3-16
Configuring ARCHIVELOG Mode 3-17
Quiz 3-18
Summary 3-19
Practice 3-1 Overview: Configuring Control Files 3-20
Practice 3-2 Overview: Configuring the Fast Recovery Area 3-21
Practice 3-3 Overview: Configuring Redo Log Files 3-22
Practice 3-4 Overview: Configuring ARCHIVELOG Mode 3-23

Using the RMAN Recovery Catalog


Objectives 4-2
RMAN Repository Data Storage: Comparison of Options 4-3
Storing Information in the Recovery Catalog 4-4
Reasons to Use a Recovery Catalog 4-5
Creating the Recovery Catalog: Three Steps 4-7
Configuring the Recovery Catalog Database 4-8
Creating the Recovery Catalog Owner 4-9
Creating the Recovery Catalog 4-10
Managing Target Database Records in the Recovery Catalog 4-11
Registering a Database in the Recovery Catalog 4-12
Unregistering a Target Database from the Recovery Catalog 4-14
Recovery Catalog Resynchronization: Concepts 4-15
Manually Resynchronizing the Recovery Catalog 4-17
Backing Up the Recovery Catalog 4-18
Creating and Using Virtual Private Catalogs 4-19
Quiz 4-20
iv

Summary 4-22
Practice 4-1 Overview: Creating the Recovery Catalog Owner 4-23
Practice 4-2 Overview: Creating the RMAN Recovery Catalog 4-24
Practice 4-3 Overview: Registering a Database in the Recovery Catalog 4-25
Practice 4-4 Overview: Configuring the Recovery Catalog for Recovery 4-26
5

Backup Concepts and Strategies


Objectives 5-2
Backup Solutions: Overview 5-3
Understanding Backup Terminology 5-4
Additional Backup Terminology 5-5
RMAN Backup Types 5-6
Configuring Backup and Restore for Very Large Files 5-8
Using a Media Manager 5-9
Balancing Backup and Restore Requirements 5-11
Using the FRA for Automatic Disk-to-Disk Backup and Recovery 5-13
Comparing Backup Strategies 5-14
Option 1: Full and Incremental Tape Backups 5-15
Option 2: Incrementally Updated Disk Backups 5-16
Option 3: Offload Backups to Physical Standby Database in Data Guard
Environment 5-17
Data Warehouse Backup and Recovery: Best Practices 5-18
Quiz 5-19
Summary 5-21
Practice 5-1 Overview: Case Study: Developing a Backup Strategy 5-22
Practice 5-2 Overview: Creating a Backup Schedule 5-23
Practice 5-3 Overview: Backing Up the Recovery Catalog 5-24

Creating Backups
Objectives 6-2
Review: Oracle-Suggested Backup 6-3
Creating Backup Sets 6-4
Creating Image Copies 6-5
Incrementally Updated Backups 6-7
Incrementally Updated Backups: Example 6-8
Creating a Whole Database Backup 6-9
Backing Up Read-Only Tablespaces 6-11
Creating RMAN Multisection Backups 6-12
Checking for Block Corruption 6-13
Fast Incremental Backup 6-14
Enabling Fast Incremental Backup 6-16
v

Monitoring Block Change Tracking 6-17


Quiz 6-18
Creating Proxy Copies 6-19
Saving Backup Space with Unused Block Compression 6-20
Compressing Backups 6-21
Using RMAN Backup Compression 6-22
Quiz 6-24
RMAN-Encrypted Backups 6-26
Creating RMAN-Encrypted Backups 6-27
Using Transparent-Mode Encryption 6-28
Using Password-Mode Encryption 6-30
Using Dual-Mode Encryption 6-31
RMAN-Encrypted Backups: Considerations 6-32
Backing Up the Control File to a Trace File 6-33
Cataloging Additional Backup Files 6-34
Backing Up ASM Disk Group Metadata 6-36
Quiz 6-37
Summary 6-38
Practice 6-1 Overview: Configuring Block Change Tracking 6-39
Practice 6-2 Overview: Creating Incremental Backups 6-40
Practice 6-3 Overview: Backing Up Other Database Files 6-41
Practice 6-4 Overview: Backing Up ASM Metadata 6-42
7

Restore and Recovery Concepts


Objectives 7-2
Employing the Best Oracle Recovery Technology 7-3
Instance Failure 7-5
Understanding Instance Recovery 7-6
Phases of Instance Recovery 7-7
Tuning Instance Recovery 7-8
Using the MTTR Advisor 7-9
Media Failure 7-10
Complete Recovery Process 7-11
Point-in-Time Recovery Process 7-12
Quiz 7-14
Summary 7-17
Practice 7-1 Overview: Case Study: Determining Recovery Procedures 7-18
Practice 7-2 Overview: Performing Instance Recovery 7-19

vi

Using the Data Recovery Advisor


Objectives 8-2
Data Recovery Advisor: Reducing Problem Diagnosis Time 8-3
Data Recovery Advisor: Overview 8-4
Using the Data Recovery Advisor 8-5
Data Recovery Advisor: RMAN Command-Line Interface 8-6
Data Recovery Advisor: Enterprise Manager Interface 8-7
Listing Data Failures 8-8
Advising on Repair 8-9
Quiz 8-10
Summary 8-11
Practice 8-1 Overview: Using Data Recovery Advisor to Repair
Corrupted Blocks 8-12
Practice 8-2 Overview: Diagnosing and Recovering from Database Failure 8-13

Performing Recovery
Objectives 9-2
Understanding File Loss 9-3
Ensuring Backups are Available 9-4
Performing Restore and Recovery of a Database in NOARCHIVELOG Mode 9-5

Using Incremental Backups to Recover a Database in NOARCHIVELOG Mode 9-6

Performing Complete Recovery: Loss of a Noncritical Data File in ARCHIVELOG


Mode 9-7
Performing Complete Recovery: Loss of a System-Critical Data File in ARCHIVELOG
Mode 9-8
Recovering from a Lost Index Tablespace 9-9
Quiz 9-10
Restoring ASM Disk Groups 9-12
Restoring ASM Disk Groups: Examples 9-13
Automatic Tempfile Recovery 9-14
Performing a Fast Switch to Image Copies 9-16
Using SET NEWNAME for Switching Files 9-17
Performing Point-in-Time Recovery 9-18
Loss of a Control File 9-20
Recovering from the Loss of All Control File Copies: Overview 9-21
Recovering the Control File to the Default Location 9-22
Performing Recovery with a Backup Control File 9-23
Quiz 9-24
Loss of a Redo Log File 9-25
Re-creating a Password Authentication File 9-27

vii

Recovery from Loss of Server Parameter File 9-29


Restoring the Server Parameter File from the Control File Autobackup 9-30
Restoring the Control File from Autobackup 9-31
Restoring Encrypted Backups 9-33
Block Media Recovery 9-34
Prerequisites for Block Media Recovery 9-35
Recovering Individual Blocks 9-36
Automatic Block Repair: Primary Database 9-37
Automatic Block Repair: Physical Standby Database 9-38
Quiz 9-39
Summary 9-40
Practice 9-1 Overview: Recovering from Media Failure (Complete Recovery) 9-41
Practice 9-2 Overview: Recovering from Media Failure (Incomplete Recovery) 9-42
Practice 9-3 Overview: Restoring the Parameter File 9-43
Practice 9-4 Overview: Restoring the Control File 9-44
Practice 9-5 Overview: Recovering from the Loss of All Control Files 9-45
Practice 9-6 Overview: Restoring the Password File 9-46
Practice 9-7 Overview: Recovering a Tempfile 9-47
Practice 9-8 Overview: Creating Encrypted Backups 9-48
Practice 9-9 Overview: Recovering by Using an Encrypted Backup 9-49
Practice 9-10 Overview: Recovering an Encryption Wallet 9-50
10 Flashback Technologies
Objectives 10-2
Flashback Technologies Error Detection and Correction 10-3
Flashback Technology 10-4
Preparing Your Database for Flashback 10-7
Guaranteeing Undo Retention 10-9
Using Flashback Data Archive 10-10
Creating a Flashback Data Archive and Enabling Archiving 10-11
Using Flashback Technology to Query Data 10-12
Flashback Query 10-13
Flashback Version Query 10-14
Flashback Version Query: Considerations 10-15
Flashback Table: Overview 10-16
Flashback Table 10-17
Performing Flashback Table 10-18
Flashback Table: Considerations 10-19
Flashback Transaction Query 10-20
Using Enterprise Manager to Perform Flashback Transaction Query 10-21
Flashback Transaction Query: Considerations 10-22
viii

Flashback Transaction 10-23


Flashing Back a Transaction 10-24
Completing the Flashback Transaction Operation 10-25
Best Practices: Undo-based Flashback Flashback Query, Flashback Table 10-26
Flashback Drop and the Recycle Bin 10-27
Quiz 10-28
Summary 10-30
Practice 10-1 Overview: Preparing to Use Flashback Technologies 10-31
Practice 10-2 Overview: Restoring a Dropped Table 10-32
Practice 10-3 Overview: Using Flashback Table 10-33
11 Flashback Database
Objectives 11-2
Flashback Database: Continuous Data Protection 11-3
Flashback Database 11-4
Flashback Database Architecture 11-5
Configuring Flashback Database 11-6
Flashback Database: Examples 11-7
Flashback Database Considerations 11-8
Monitoring Flashback Database Information 11-9
Using Enterprise Manager to Monitor Flashback Database Information 11-11
Guaranteed Restore Points 11-12
Flashback Database and Guaranteed Restore Points 11-13
Best Practices: Flashback Database 11-15
Quiz 11-17
Summary 11-19
Practice 11-1 Overview: Configuring Flashback Database 11-20
Practice 11-2 Overview: Using Flashback Database 11-21
Practice 11-3 Overview: Preparing Your System for the Workshop 11-22
12 RMAN Performance and Tuning
Objectives 12-2
Using Dynamic Views to Diagnose RMAN Performance 12-3
Monitoring RMAN Job Progress 12-4
Identifying Backup and Restore Bottlenecks 12-6
Asynchronous I/O Bottlenecks 12-7
Synchronous I/O Bottlenecks 12-8
Tuning RMAN Backup Performance 12-9
Setting LARGE_POOL_SIZE 12-10
RMAN Multiplexing 12-11
Diagnosing Performance Bottlenecks 12-13
ix

Diagnosing Performance Bottlenecks: Read Phase 12-14


Diagnosing Performance Bottlenecks: Write or Copy Phase 12-15
Restore and Recovery Performance: Best Practices 12-16
Quiz 12-17
Summary 12-18
13 Workshop Overview
Objectives 13-2
Workshop Structure and Approach 13-3
Business Requirements for the Workshop Database 13-5
Diagnosing the Failures 13-6
Summary 13-7

Anda mungkin juga menyukai