Skip Headers
Oracle® Database Backup and Recovery Basics
10
g
Release 2 (10.2)
Part Number B14192-03
Home
Book List
Index
Master Index
Contact Us
Next
PDF
·
Mobi
·
ePub
Contents
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documentation
Conventions
1
Backup and Recovery Overview
1.1
What is Backup and Recovery?
1.1.1
Physical Backups and Logical Backups
1.1.2
Errors and Failures Requiring Recovery from Backup
1.1.2.1
Understanding User Error
1.1.2.2
Understanding Media Failure
1.1.3
Oracle Backup and Recovery Solutions: RMAN and User-Managed Backup
1.2
Backup and Recovery: Basic Concepts
1.2.1
Physical Database Structures Used in Recovering Data
1.2.1.1
Datafiles and Data Blocks
1.2.1.2
Redo Logs
1.2.1.3
Control Files
1.2.1.4
Undo Segments
1.3
The Database Recovery Process: Basic Concepts
1.4
Forms of Data Recovery
1.4.1
Datafile Media Recovery: Restore Datafiles, Apply Redo
1.4.2
Complete, Incomplete and Point-In-Time Recovery
1.4.3
Automatic Recovery After Instance Failure: Crash Recovery
1.5
Backup and Recovery with RMAN
1.5.1
Files That RMAN Can Back Up
1.5.2
RMAN Backup Destinations: Disk and Media Managers
1.5.3
Types of Oracle Database Backup under RMAN
1.5.3.1
About Consistent and Inconsistent Backups
1.5.3.2
About Full and Incremental Backups
1.5.3.3
About Image Copies, Backup Sets and Backup Pieces
1.6
Automatic Disk-Based Backup and Recovery: The Flash Recovery Area
1.7
Oracle Flashback Technology: Alternatives to Point-in-Time Recovery
1.7.1
About Restore Points
1.8
Matching Failures to Backup and Recovery Techniques
1.8.1
Responding to Media Failure
1.8.2
Responding to User Error
1.9
System Requirements for Backup and Recovery Methods
1.10
Feature Comparison of Backup Methods
2
Backup and Recovery Strategies
2.1
Data Recovery Strategy Determines Backup Strategy
2.2
Planning Data Recovery Strategy
2.2.1
Planning Responses to User Error: Point-in-Time Recovery and Flashback Features
2.2.1.1
Flashback Database
2.2.1.2
Creating Normal and Guaranteed Restore Points
2.2.1.3
Database Point-in-Time Recovery
2.2.1.4
Importing Lost Objects from Logical Backup
2.2.2
Planning a Response to Media Failure: Restore and Media Recovery
2.2.2.1
Example: Online Redo Log Recovery
2.2.3
Planning a Response to Datafile Block Corruption: Block Media Recovery
2.3
Planning Backup Strategy
2.3.1
Protecting Your Redundancy Set
2.3.2
Deciding Whether to Use a Flash Recovery Area
2.3.3
Deciding Between ARCHIVELOG and NOARCHIVELOG Mode
2.3.3.1
Implications of Running in NOARCHIVELOG Mode
2.3.3.2
Implications of Running in ARCHIVELOG Mode
2.3.4
Deciding Whether to Use Oracle Flashback Features and Restore Points
2.3.5
Choosing a Backup Retention Policy
2.3.5.1
Implementing Backup Retention Policy with RMAN
2.3.5.2
Recovery Window-Based Backup Retention Policy
2.3.5.3
Redundancy-Based Backup Retention Policy
2.3.6
Archiving Older Backups
2.3.7
Determining Backup Frequency
2.3.8
Performing Backups Before and After You Make Structural Changes
2.3.9
Scheduling Backups for Frequently-Updated Tablespaces
2.3.10
Backing Up after NOLOGGING Operations
2.3.11
Exporting Data for Added Protection and Flexibility
2.3.12
Preventing the Backup of Online Redo Logs
2.3.13
Keeping Records of the Hardware and Software Configuration of the Server
2.4
Validating Your Data Recovery Strategy
2.4.1
Using BACKUP... VALIDATE
2.4.2
Validating RMAN Backups: VALIDATE and RESTORE VALIDATE
2.4.3
Testing Your Database Restore and Recovery Procedures
3
Setting Up and Configuring Backup and Recovery
3.1
Overview of Interacting With the RMAN Client
3.1.1
Starting and Exiting RMAN
3.1.2
Setting Globalization Support Environment Variables for RMAN
3.1.3
Entering RMAN Commands at the Command Prompt
3.1.4
Using Command Files with RMAN
3.1.5
Checking Syntax of RMAN Commands and Command Files: CHECKSYNTAX
3.1.5.1
Checking RMAN Syntax at the Command Line: Example
3.1.5.2
Checking RMAN Syntax in Command Files: Example
3.2
Using RMAN to Start Up and Shut Down Databases
3.3
Connecting the RMAN Client to Databases
3.3.1
Types of Database Connections Used with RMAN
3.3.2
Authentication for Database Connections
3.3.3
Connecting to the Target Database from the Command Line
3.3.4
Connecting to the Target Database from the RMAN Prompt
3.4
Setting Up a Database for RMAN Backup
3.4.1
Persistent Configuration Settings: Controlling RMAN Behavior
3.4.1.1
Displaying Current RMAN Configuration Settings: SHOW
3.4.1.2
Restoring Default RMAN Configuration Settings: CONFIGURE... CLEAR
3.4.2
Configuring the Default Device Type for Backups
3.4.3
Configuring the Default Backup Type for Disk Backups
3.4.4
Configuring Compressed Backupsets as Default for Tape or Disk
3.4.5
Configuring Disk Devices and Channels
3.4.6
Configuring Tape Devices and Channels
3.4.7
Configuring Control File and Server Parameter File Autobackup
3.4.7.1
Configuring the Control File Autobackup Format
3.4.7.2
Overriding the Configured Control File Autobackup Format
3.5
Setting Up a Flash Recovery Area for RMAN
3.5.1
Choosing a Location for the Flash Recovery Area
3.5.1.1
Flash Recovery Area, Automatic Storage Management, and Oracle Managed Files
3.5.2
Files That Can Be Stored in the Flash Recovery Area
3.5.3
Planning the Size of the Flash Recovery Area
3.5.4
Setting Initialization Parameters for Size and Location of the Flash Recovery Area
3.5.4.1
Flash Recovery Area Size: DB_RECOVERY_FILE_DEST_SIZE
3.5.4.2
Flash Recovery Area Location: Initialization Parameter DB_RECOVERY_FILE_DEST
3.5.4.3
Sharing a Flash Recovery Area Among Multiple Databases
3.5.4.4
Restrictions on Initialization Parameters When Using Flash Recovery Area
3.5.4.5
Adding a Flash Recovery Area to an Existing Database
3.5.4.6
Using V$RECOVERY_FILE_DEST and V$FLASH_RECOVERY_AREA_USAGE
3.5.4.7
Disabling the Flash Recovery Area
3.5.5
Configuring the Backup Retention Policy
3.5.5.1
Configuring a Recovery Window-Based Retention Policy
3.5.5.2
Configuring a Redundancy-Based Retention Policy
3.5.5.3
Showing the Current Retention Policy
3.5.5.4
Disabling the Retention Policy
3.5.6
How Oracle Manages Disk Space in the Flash Recovery Area
3.5.6.1
When Files are Eligible for Deletion from the Flash Recovery Area
3.5.6.2
When Space is Not Available in the Flash Recovery Area
3.5.7
Configure Flash Recovery Area for Disk-Based Backups: Example
3.5.8
Create a Database with Multiplexed Files in the Flash Recovery Area: Scenario
3.5.9
Creating a Database with Only Archived Logs in the Flash Recovery Area: Scenario
4
Backing Up Databases Using RMAN
4.1
Overview of RMAN Backups
4.1.1
Files That RMAN Can Back Up
4.1.2
About RMAN Backup Formats: Image Copies and Backup Sets
4.1.2.1
About Image Copies
4.1.2.2
About Backup Sets
4.1.3
About RMAN Full and Incremental Datafile Backups
4.2
Specifying Options Affecting Output of the RMAN BACKUP Command
4.2.1
Specifying Output Device Type for RMAN BACKUP
4.2.2
Specifying Image Copy or Backup Set Output for RMAN BACKUP to Disk
4.2.3
Specifying Output File Locations for RMAN BACKUP
4.2.4
Specifying Tags for RMAN BACKUP
4.2.5
Using Compressed Backupsets for RMAN Backup
4.3
Backing Up Database Files and Archived Logs with RMAN
4.3.1
Making Consistent and Inconsistent Backups with RMAN
4.3.2
Making Whole Database Backups with RMAN
4.3.3
Backing Up Individual Tablespaces with RMAN
4.3.4
Backing Up Individual Datafiles and Datafile Copies with RMAN
4.3.4.1
Backing Up Datafiles
4.3.4.2
Backing Up Datafile Copies
4.3.5
Backing Up Control Files with RMAN
4.3.5.1
Including the Current Control File in a Backup of Other Files
4.3.5.2
Backing Up the Current Control File Manually
4.3.5.3
Backing Up a Control File Copy
4.3.6
Backing Up Server Parameter Files with RMAN
4.3.7
Backing Up Archived Redo Logs with RMAN
4.3.7.1
Backing Up Archived Redo Log Files with BACKUP ARCHIVELOG
4.3.7.1.1
Automatic Online Redo Log Switches During Backups of Archived Logs
4.3.7.1.2
Using BACKUP ARCHIVELOG with DELETE INPUT or DELETE ALL INPUT
4.3.7.2
Backing Up Logs with BACKUP ... PLUS ARCHIVELOG
4.4
RMAN Incremental Backups
4.4.1
Incremental Backup Algorithm
4.4.1.1
Level 0 and Level 1 Incremental Backups
4.4.1.2
Differential Incremental Backups
4.4.1.3
Cumulative Incremental Backups
4.4.1.4
Basic Incremental Backup Strategy
4.4.2
Making Incremental Backups: BACKUP INCREMENTAL
4.4.3
Incrementally Updated Backups: Rolling Forward Image Copy Backups
4.4.3.1
Incrementally Updated Backups: A Basic Example
4.4.3.2
Incrementally Updated Backups: A One Week Example
4.4.4
Improving Incremental Backup Performance: Change Tracking
4.4.4.1
Enabling and Disabling Change Tracking
4.4.4.2
Checking Whether Change Tracking is Enabled
4.4.4.3
Moving the Change Tracking File
4.4.4.4
Estimating Size of the Change Tracking File on Disk
4.5
Using RMAN to Validate Database Files
4.6
Overview of Reporting on Backups and the RMAN Repository
4.7
Listing RMAN Backups, Archived Logs, and Database Incarnations
4.7.1
About RMAN Reports Generated by the LIST Command
4.7.2
Listing Backups
4.7.2.1
Listing Backups by Backup
4.7.2.2
Listing Backups by File
4.7.3
Listing Backups in Summary Mode
4.7.4
Listing Selected Backups
4.7.5
Listing Database Incarnations
4.8
Reporting on Backups and Database Schema
4.8.1
About Reports of RMAN Backups
4.8.2
Reporting on Files Needing a Backup Under a Retention Policy
4.8.2.1
Using RMAN REPORT NEED BACKUP with Different Retention Policies
4.8.2.2
Using RMAN REPORT NEED BACKUP with Tablespaces and Datafiles
4.8.2.3
Using REPORT NEED BACKUP with Backups onTape or Disk Only
4.8.3
Reporting on Datafiles Affected by Unrecoverable Operations
4.8.4
Reporting Obsolete Backups
4.8.5
Reporting on the Database Schema
5
Data Protection with Restore Points and Flashback Database
5.1
Restore Points and Flashback Database: Concepts
5.1.1
About Flashback Database
5.1.1.1
About the Flashback Database Window
5.1.2
About Normal Restore Points
5.1.2.1
Commands Supporting the Use of Restore Points
5.1.3
About Guaranteed Restore Points
5.1.3.1
Using Guaranteed Restore Points Instead of Storage Snapshots
5.1.4
About Logging for Flashback Database and Guaranteed Restore Points
5.1.4.1
Guaranteed Restore Points and Flash Recovery Area Space Usage
5.1.4.2
Logging for Guaranteed Restore Points With Flashback Logging Disabled
5.1.4.3
Logging for Flashback Database With Guaranteed Restore Points Defined
5.2
Using Normal and Guaranteed Restore Points
5.2.1
Requirements for Using Guaranteed Restore Points
5.2.2
Creating Normal and Guaranteed Restore Points
5.2.3
Listing Restore Points
5.2.4
Dropping Restore Points
5.2.5
Monitoring Space Usage For Guaranteed Restore Points
5.3
Setup and Maintenance for Oracle Flashback Database
5.3.1
Limitations of Flashback Database
5.3.2
Requirements for Enabling Flashback Database
5.3.3
Enabling Logging for Flashback Database
5.3.4
Sizing the Flash Recovery Area to Include Flashback Logs
5.3.4.1
Estimating Disk Space Requirements for Flashback Database Logs
5.3.5
Managing Space For Flashback Logs in the Flash Recovery Area
5.3.5.1
Rules for Retention and Deletion of Flashback Logs
5.3.6
Determining the Current Window for Flashback Database
5.3.7
Performance Tuning for Flashback Database
5.3.8
Monitoring Flashback Database Performance Impact
5.3.9
Flashback Writer (RVWR) Behavior With I/O Errors
6
Performing Complete Restore and Recovery of Databases
6.1
Database Restore and Recovery with RMAN: Overview
6.1.1
Scope and Limitations of this Chapter
6.1.2
Restore and Recovery with Enterprise Manager
6.2
Basic Database Restore and Recovery Scenarios
6.2.1
Restore and Recovery of a Whole Database: Scenario
6.2.1.1
Recovery of Databases with Read-Only Tablespaces
6.2.1.2
Re-Creation of Temporary Tablespaces in Whole Database Restore and Recovery
6.2.2
Restore and Complete Recovery of Individual Tablespaces or Datafiles: Scenario
6.3
Preparing and Planning Database Restore and Recovery
6.3.1
Database Restore and Recovery Procedure: Outline
6.3.2
Determining Which Database Files to Restore or Recover
6.3.2.1
Recognizing a Lost Control File
6.3.2.2
Identifying Datafiles Requiring Media Recovery
6.3.2.3
Recovery of Read-Only Tablespaces
6.3.3
Determining your DBID
6.3.4
Previewing Backups Used in Restore Operations: RESTORE PREVIEW
6.3.4.1
Using RESTORE... PREVIEW
6.3.4.2
Using RESTORE... PREVIEW SUMMARY
6.3.4.3
Using RESTORE... PREVIEW RECALL
6.3.5
Validating the Restore of Backups: RESTORE VALIDATE and VALIDATE BACKUPSET
6.3.5.1
Validating Restore from Backup with RESTORE ... VALIDATE
6.3.5.2
Validating Backup Sets with VALIDATE BACKUPSET
6.4
RMAN RESTORE: Restoring Lost Database Files from Backup
6.4.1
Restoring the Control File from Backup
6.4.1.1
Default Destination for Restore of the Control File
6.4.1.2
Restore of the Control File from Control File Autobackup
6.4.1.3
Restore of the Control File When Using a Flash Recovery Area
6.4.1.4
Restoring a Control File When Using a Recovery Catalog
6.4.1.5
Restore of the Control File From a Known Location
6.4.1.6
Restore of the Control File to a New Location
6.4.1.7
Limitations When Using a Backup Control File
6.4.2
Restoring the Server Parameter File (SPFILE) from Backup
6.4.2.1
Restore of the SPFILE from the Control File Autobackup
6.4.2.2
Creating a Client-Side Initialization Parameter File (PFILE) with RMAN
6.4.3
Restoring and Recovering Datafiles and Tablespaces
6.4.3.1
Restoring Datafiles from Backup to a New Location
6.4.3.2
Performing Media Recovery of a Restored Database, Tablespace or Datafile
6.4.3.3
Restore and Recover of a Single Datafile to a New Location:Example
6.4.4
Restoring Archived Redo Logs from Backup
6.4.4.1
Restoring Archived Redo Logs to a New Location
6.4.4.2
Restoring Archived Redo Logs to Multiple Locations
7
Performing Flashback and Database Point-in-Time Recovery
7.1
About Point-in-Time Recovery and Flashback Features
7.1.1
About Database Point-in-Time Recovery
7.1.2
Oracle Flashback Technology:Alternatives to Point-in-Time Recovery
7.2
Oracle Flashback Query: Recovering at the Row Level
7.3
Oracle Flashback Table: Returning Individual Tables to Past States
7.3.1
Prerequisites for Using Flashback Table
7.3.2
Performing Flashback Table
7.4
Oracle Flashback Drop: Undo a DROP TABLE Operation
7.4.1
What is the Recycle Bin?
7.4.2
How Tables and Other Objects Are Placed in the Recycle Bin
7.4.3
Naming Convention for Objects in the Recycle Bin
7.4.4
Enabling and Disabling the Recycle Bin
7.4.5
Viewing and Querying Objects in the Recycle Bin
7.4.6
Recycle Bin Capacity and Space Pressure
7.4.6.1
Understanding Space Pressure
7.4.6.2
How the Database Responds to Space Pressure
7.4.6.3
Recycle Bin Objects and Segments
7.4.7
Performing Flashback Drop on Tables in the Recycle Bin
7.4.7.1
Flashback Drop of Multiple Objects With the Same Original Name
7.4.8
Purging Objects from the Recycle Bin
7.4.8.1
PURGE TABLE: Purging a Table and Dependent Objects
7.4.8.2
PURGE INDEX: Freeing Space in the Recycle Bin
7.4.8.3
PURGE TABLESPACE: Purging All Dropped Objects from a Tablespace
7.4.8.4
PURGE RECYCLEBIN: Purging All Objects in a User's Recycle Bin
7.4.8.5
PURGE DBA_RECYCLEBIN: Purging All Recycle Bin Objects
7.4.8.6
Dropping a Tablespace, Cluster, User or Type and the Recycle Bin
7.4.9
Privileges and Security for Flashback Drop
7.4.10
Limitations and Restrictions on Flashback Drop
7.5
Reversing Database Changes with Flashback Database
7.5.1
Performing Flashback Database: Scenario
7.5.1.1
Options After a Successful Flashback Database Operation
7.5.1.2
Options After Flashback Database to the Wrong Time
7.5.1.3
Flashback Database and Ambiguous SCNs Across Incarnations
7.5.2
Performing Flashback Database to a Guaranteed Restore Point
7.5.3
Performing Flashback Database to Undo an OPEN RESETLOGS
7.5.3.1
Flashback Database Across OPEN RESETLOGS With Standby Databases
7.5.4
Flashback Database To The Right of Open Resetlogs: Example
7.6
Performing Database Point-In-Time Recovery
7.6.1
Requirements for Database Point-in-Time Recovery
7.6.2
Point-in-Time Recovery and Database Incarnations: Concepts
7.6.2.1
Understanding Parent, Ancestor and Sibling Database Incarnations
7.6.2.2
Incarnation History of a Database: Example
7.6.2.2.1
Sibling Incarnations, Ambiguous SCNs and RESET DATABASE INCARNATION
7.6.2.3
Database Incarnations and Orphaned Backups
7.6.2.3.1
Uses of Orphaned Backups
7.6.3
Preparing for Database Point-in-Time Recovery
7.6.4
Database Point-in-Time Recovery Within the Current Incarnation
7.6.4.1
Using a Time Expression for Database Point-in-Time Recovery
7.6.5
Options After Database Point-in-Time Recovery
7.6.6
Point-in-Time Recovery to an Ancestor Incarnation
8
Recovery Manager Maintenance Tasks
8.1
Managing the RMAN Repository Using Only the Control File
8.1.1
Backing Up and Restoring the Control File
8.1.2
Monitoring the Overwriting of Control File Records
8.1.2.1
Managing the Overwriting of Control File Records
8.1.2.2
Interaction of Flash Recovery Area and CONTROL_FILE_RECORD_KEEP_TIME
8.2
Using CROSSCHECK to Update the RMAN Repository
8.2.1
About RMAN Crosschecks
8.2.2
Basic Use of CROSSCHECK with Backup Sets and Image Copies
8.2.3
Crosschecking Specific Backup Sets and Copies
8.2.4
Crosschecking Backups of Specific Database Files
8.2.5
Limiting RMAN CROSSCHECK to a Backups Since a Specific Time
8.3
Deleting Backups
8.3.1
Deleting Specified Backups
8.3.2
Deleting Expired RMAN Backups after CROSSCHECK
8.3.3
Using DELETE FORCE With RMAN Backups
8.3.4
Deleting Obsolete RMAN Backups Based on Retention Policies
8.3.4.1
DELETE OBSOLETE Behavior When KEEP UNTIL Time Expires
8.4
Using Multiple RMAN Channels for Maintenance Operations
8.4.1
About Allocating Multiple RMAN Channels for Maintenance Commands
8.4.2
How RMAN Crosschecks and Deletes on Multiple Channels
8.4.3
Crosschecking Disk and Tape Channels with One Command: Example
8.4.4
Crosschecking on Multiple Oracle Real Application Cluster Nodes: Example
8.4.5
Deleting on Disk and Tape Channels with One DELETE Command: Example
8.4.6
Releasing Multiple Channels: Example
8.5
Deleting a Database with RMAN
8.6
Changing the Status of a Backup Record
8.6.1
Marking a Backup AVAILABLE or UNAVAILABLE
8.6.2
Exempting a Long-Term Backup from the Retention Policy
8.7
Cataloging Archived Logs and User-Managed Copies
8.7.1
About Cataloging Archived Logs and User-Managed Copies
8.7.2
Cataloging User-Managed Datafile Copies
8.7.3
Cataloging Backup Pieces
8.7.4
Cataloging All Files in a Disk Location
8.7.5
Cataloging Flash Recovery Area Contents
8.8
Uncataloging RMAN Records
8.8.1
About Uncataloging RMAN Records
8.8.2
Removing Records for Files Deleted with Operating System Utilities
8.9
Flash Recovery Area Maintenance
8.9.1
Resolving a Full Flash Recovery Area
8.9.2
Changing the Flash Recovery Area to a New Location
8.9.3
Flash Recovery Area Behavior When Instance Crashes During File Creation
A
RMAN-Based Disk and Tape Backup Strategies: Scenarios
A.1
Backing Up to the Flash Recovery Area: Basic Scenarios
A.1.1
Scripting Disk-Only Backups
A.1.1.1
Backup Scripts When Few Data Blocks Change
A.1.1.1.1
Initial Setup
A.1.1.1.2
Daily Script
A.1.1.2
Backup Scripts When Blocks Change Frequently
A.1.1.3
Backup Scripts When a Moderate Number of Blocks Change Weekly
A.1.1.3.1
Initial Setup
A.1.1.3.2
Weekly Script
A.2
Backing Up to the Flash Recovery Area and to Tape: Basic Scenarios
A.2.1
Configuring the RMAN Environment for Disk and Tape Backups
A.2.2
Writing Backup Scripts for Disk and Tape Scenarios
A.2.2.1
Backup Scripts When Few Data Blocks Change
A.2.2.1.1
Initial Setup
A.2.2.1.2
Daily Script
A.2.2.2
Backup Scripts When Many Blocks Change
A.2.2.2.1
Initial Setup
A.2.2.2.2
Weekly Scripts
A.2.2.2.3
Daily Script
A.2.2.3
Backup Scripts When Blocks Change Moderately
A.2.2.3.1
Initial Setup
A.2.2.3.2
Weekly Script
A.2.2.3.3
Daily Script
A.2.2.4
Backup Scripts When Not Enough Disk Space for a Database Backup
A.2.2.4.1
Weekly Script
A.2.2.4.2
Daily Script
Glossary
Index
Scripting on this page enhances content navigation, but does not change the content in any way.