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
Trang 1Oracle Database 10g:
Backup and Recovery Volume II • Student Guide
D22057GC10
Production 1.0
June 2006
D46525
®
Oracle Internal & OAI Use Only
Trang 2Copyright © 2006, Oracle All rights reserved.
Disclaimer
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 Government’s 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, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates Other names may be trademarks of their respective owners.
Authors
Donna Keesling
Maria Billings
Technical Contributors
and Reviewers
Christopher Andrews
Tammy Bednar
Tom Best
Harald van Breederode
Mary Jane Bryksa
Marielle Canning
Tim Chien
Donna Cooksey
Judy Ferstenberg
Gerlinde Frenzen
Joel Goodman
Pete Jones
Isabelle Marchand
Sabiha Miri
Manish Pawar
Jim Spiller
George Stabler
Anthony Woodell
Editor
Daniel Milne
Graphic Designer
Satish Bettegowda
Publisher
Jobi Varghese
Oracle Internal & OAI Use Only
Trang 3Contents
1 Introduction
Objectives 1-2
Course Objectives 1-3
What Is Backup and Recovery? 1-4
Performing Backup and Recovery Operations for an Oracle Database 1-5 Using Oracle Recovery Manager 1-6
Recovery Manager Components 1-7
Using Oracle Secure Backup 1-9
Overview of Oracle Backup Methods 1-10
When Do You Need to Use a Backup for Recovery? 1-12
Responding to User Error 1-13
Overview of Data Recovery 1-14
Oracle Database Architecture: Crash Recovery 1-15
Oracle Database Architecture: Recovery After Media Failure 1-16
Developing a Backup and Recovery Strategy for Your Oracle Database 1-17 Oracle Solutions for High Availability 1-18
Oracle High Availability Solutions for Unplanned Downtime 1-19
Summary 1-21
2 Configuring for Recoverability
Objectives 2-2
Configuring Your Database for Backup and Recovery Operations 2-3
Configuring ARCHIVELOG Mode 2-4
Specifying a Backup Destination 2-5
Specifying a Retention Policy 2-6
Using a Flash Recovery Area 2-8
Defining a Flash Recovery Area 2-9
Defining Flash Recovery Area Using Enterprise Manager 2-10
Flash Recovery Area Space Management 2-11
Flash Recovery Area Space Usage 2-13
Monitoring the Flash Recovery Area 2-14
Benefits of Using a Flash Recovery Area 2-15
Summary 2-16
Practice Overview 2-17
iii
Oracle Internal & OAI Use Only
Trang 43 Using RMAN to Create Backups
Objectives 3-2
Using RMAN to Create Backups 3-3
Backup Destinations 3-4
Configuring Persistent Settings for RMAN 3-5
Using Enterprise Manager to Configure RMAN Settings 3-6
Managing Persistent Settings 3-7
Configuring and Allocating Channels for Use in Backups 3-8
Configuring Backup Optimization 3-9
Creating Backup Sets 3-11
Creating Image Copies 3-12
BACKUP Command Options 3-14
Creating a Whole Database Backup 3-16
RMAN Backup Types 3-17
Fast Incremental Backup 3-19
Enabling Fast Incremental Backup 3-20
Monitoring Block Change Tracking 3-21
Creating an Oracle-Suggested Backup 3-22
Creating Duplexed Backup Sets 3-23
Creating Duplexed Backup Sets Using CONFIGURE BACKUP COPIES 3-24
Creating Duplexed Backup Sets Using BACKUP COPIES 3-25
Creating Backups of Backup Sets 3-26
Configuring Control File Autobackups 3-27
Using a Media Manager 3-29
Creating Proxy Copies 3-31
Managing Backups: Reporting 3-32
Using Enterprise Manager to View Backup Reports 3-34
Managing Backups: Crosschecking and Deleting 3-35
Using Enterprise Manager to Manage Backups 3-36
Summary 3-37
Practice Overview 3-38
4 Using RMAN to Perform Recovery
Objectives 4-2
Using RMAN RESTORE and RECOVER Commands 4-3
Performing Recovery Using Enterprise Manager 4-4
Comparing Complete and Incomplete Recovery 4-5
Complete Recovery Following the Loss of Datafiles 4-6
Performing Complete Recovery: Loss of a Non-Critical datafile in ARCHIVELOG
Mode 4-7
Oracle Internal & OAI Use Only
Trang 5Performing Complete Recovery: Loss of a System-Critical Datafile in ARCHIVELOG Mode 4-8
Recovery Using Incrementally Updated Backups 4-9
Using the Flash Recovery Area for Fast Recovery 4-10
Performing Restore and Recovery of a Database in NOARCHIVELOG Mode 4-11 Using Incremental Backups to Recover a Database in NOARCHIVELOG Mode 4-12 Restoring and Recovering the Database on a New Host 4-13
Preparing to Restore the Database to a New Host 4-14
Restoring the Database to a New Host 4-15
Performing Recovery with a Backup Control File 4-19
Restoring the Server Parameter File from the Control File Autobackup 4-20
Restoring the Control File from Autobackup 4-21
Performing Disaster Recovery 4-23
Summary 4-25
Practice Overview 4-26
5 Using Oracle Flashback Technologies
Objectives 5-2
Using Oracle Flashback Technology 5-3
Flashback Drop and the Recycle Bin 5-4
Understanding the Recycle Bin 5-5
Restoring Tables from the Recycle Bin 5-6
Automatic Space Reclamation in the Recycle Bin 5-7
Manual Space Reclamation in the Recycle Bin 5-8
Bypassing the Recycle Bin 5-9
Querying the Recycle Bin 5-10
Querying Data in Dropped Tables 5-11
Using Flashback Technology to Query Data 5-12
Configuring Undo for Flashback 5-13
Flashback Query: Overview 5-14
Flashback Query: Example 5-15
Flashback Versions Query: Overview 5-16
Using Enterprise Manager to Perform Flashback Versions Query 5-17
Flashback Versions Query: Considerations 5-18
Flashback Transaction Query: Overview 5-19
Using Enterprise Manager to Perform Flashback Transaction Query 5-20
Flashback Transaction Query: Considerations 5-21
Flashback Table: Overview 5-22
Flashback Table 5-23
Enabling Row Movement on a Table 5-24
Performing Flashback Table 5-25
v
Oracle Internal & OAI Use Only
Trang 6World Wide Names (WWNs) A unique identifier for devices on a storage
area network (SAN), similar to a media access control (MAC) address for devices connected via Ethernet WWNs consist of
16 hexadecimal digits grouped as 8 pairs These are written with colon characters separating each pair The format of the WWN is defined by the Institute of Electrical and Electronics Engineers (IEEE) It is also referred to as a WWPN (Worldwide Port Name) or WWNN (Worldwide Node Name)
optical recording systems that allow recording and adding data but not altering recorded data
the volume’s first data write operation, during which updates to the volume are allowed
cannot be modified or deleted Write-protected files and media can only be read; you cannot write to them, edit them, append data to them, or delete them
remains open for updates, usually by appending additional backup images The write window opens at the time the volume set is created, and closes after this specified period has elapsed After the write window closes, Oracle Secure Backup does not allow any further updates to the volume set until it expires, or until it is relabeled, reused, unlabeled, or forcibly overwritten
Oracle Internal & OAI Use Only
Trang 7Oracle Internal & OAI Use Only