Oracle8i Backup and Recovery Guide
Release 8.1.5

A67773-01

Library

Product

Index

Next

Contents

Title and Copyright Information

Send Us Your Comments

Preface

Part I Developing a Backup and Recovery Strategy

1 What Is Backup and Recovery?

What Is Backup and Recovery?
How Oracle Keeps Records of Database Transactions
Backup and Recovery Operations
Elementary Backup and Recovery Strategy
Which Data Structures Are Important for Backup and Recovery?
Datafiles
Control Files
Rollback Segments
Online Redo Log Files
Archived Redo Log Files
Understanding Basic Backup Strategy
Why Are Backups Important?
What Types of Failures Can Occur?
What Should You Back Up?
Which Backup Method Should You Use?
Should You Make Consistent or Inconsistent Backups?
How Often Should You Make Backups?
Understanding Basic Recovery Strategy
How Does Recovery Work?
What Are the Types of Recovery?
What Is Media Recovery?
Which Recovery Method Should You Use?

2 Managing Data Structures

Overview of Backup and Recovery Data Structures
Managing the Control File
Displaying Control File Information
Backing Up the Control File After Structural Changes
Maintaining Multiple Control Files
Recovering from the Loss of Control Files
Managing the Online Redo Log
Displaying Online Redo Log Information
Multiplexing Online Redo Log Files
Managing the Archived Redo Logs
Choosing Between NOARCHIVELOG and ARCHIVELOG Mode
Displaying Archived Redo Log Information
Archiving Redo Logs to Multiple Locations

3 Developing a Backup and Recovery Strategy

Choosing Backup Types
Whole Database Backups
Tablespace Backups
Datafile Backups
Control File Backups
Choosing Backup Methods
Recovery Manager
Operating System (O/S)
Export
Enterprise Backup Utility
Feature Comparison of Backup Methods
Choosing Backup Formats
Backup Sets
Image Copies
Operating System Backups
Logical Backups
Developing a Backup Strategy
Decide Whether to Run in ARCHIVELOG or NOARCHIVELOG Mode
Multiplex Control Files, Online Redo Logs, and Archived Redo Logs
Perform Backups Frequently and Regularly
Perform Backups When You Make Structural Changes
Perform Frequent Backups of Often-Used Tablespaces
Perform Backups After Unrecoverable/Unlogged Operations
Perform Whole Database Backups After Using the RESETLOGS Option
Store Older Backups
Know the Constraints for Distributed Database Backups
Export Database Data for Added Protection and Flexibility
Do Not Back Up Online Redo Logs
Developing a Recovery Strategy
Test Backup and Recovery Strategies
Handling Non-Media Failures
Recovering from Media Failure

Part II Using Recovery Manager

4 Recovery Manager Concepts

Overview of Recovery Manager
Recovery Manager Features
What Recovery Manager Is Not
Recovery Manager Commands
Recovery Manager PL/SQL Packages
How Recovery Manager Compiles and Executes Commands
Types of Recovery Manager Commands
User Execution of Recovery Manager Commands
Recovery Manager Command Errors
Recovery Manager Metadata
Storage of Metadata in the Recovery Catalog
Storage of Metadata Exclusively in the Control File
Media Management
Backup and Restore Operations Using a Media Manager
Media Manager Crosschecks
Proxy Copy
Media Manager Testing
Backup Solutions Program
Lists and Reports
Lists of Backups and Copies
Reports on Backups, Copies, and Database Schema
Channel Allocation
Channel Control Options
Channel Parallelization
Backup Sets
Storage of Backup Sets
Backup Set Compression
Filenames for Backup Pieces
Size of Backup Pieces
Number of Backup Sets
Multiplexed Backup Sets
Duplexed Backup Sets
Parallelization of Backups
Backup Errors
Backup Types
Full Backups
Incremental Backups
Backup Constraints
Image Copies
RMAN Image Copies
O/S Image Copies
Tags for Backups and Image Copies
Restoring Files
File Selection in Restore Operations
Restore Constraints
Media Recovery
Application of Incremental Backups and Redo Records
Incomplete Recovery
Tablespace Point-in-Time Recovery
Database Duplication
Integrity Checks
Detection of Physical Block Corruption
Detection of Logical Block Corruption
Detection of Fractured Blocks During Open Backups

5 Getting Started with Recovery Manager

Setting Up Recovery Manager
Using Password Files
Setting NLS Environment Variables
Determining the Snapshot Control File Location
Deciding Whether to Use a Recovery Catalog
Consequences of Using the Recovery Catalog for RMAN Metadata
Consequences of Using the Control File for RMAN Metadata
Connecting to RMAN
Connecting to RMAN Without a Recovery Catalog
Connecting to RMAN with a Recovery Catalog
Connecting to an Auxiliary Database
Disconnecting from RMAN
Using Basic RMAN Commands
Connecting to RMAN
Mounting the Database
Reporting the Current Schema
Copying a Datafile
Backing Up a Tablespace
Listing Backups and Copies
Validating a Restore
Configuring a Media Manager
Linking with a Media Manager
Generating Unique Filenames
Limiting File Size
Sending Device-Specific Strings to the Media Manager
Troubleshooting the Media Manager
Using Sample Scripts and Scenarios

6 Managing Recovery Manager Metadata

Creating the Recovery Catalog
Maintaining RMAN Metadata
Registering a Database with the Recovery Catalog
Unregistering a Database from the Recovery Catalog
Resetting the Recovery Catalog
Changing the Availability of a Backup or File Copy
Crosschecking RMAN Metadata
Deleting Backups and Copies and Updating Their Status in the RMAN Metadata
Validating the Restore of Backups and Copies
Storing Scripts in the Recovery Catalog
Resynchronizing the Recovery Catalog
Managing Records in the Control File
Cataloging O/S Backups
Backing Up and Recovering the Recovery Catalog
Backing Up the Recovery Catalog
Recovering the Recovery Catalog
Re-Creating the Recovery Catalog
Upgrading the Recovery Catalog
Dropping the Recovery Catalog
Managing RMAN Metadata Without a Recovery Catalog
Maintaining the Control File Metadata
Backing Up the Control File

7 Generating Lists and Reports with Recovery Manager

Using Lists and Reports in Your Backup and Recovery Strategy
Generating Lists
Generating Reports
List and Report Scenarios
Makings Lists of Backups and Copies
Using Lists to Determine Obsolete Backups and Copies
Reporting Datafiles Needing Backups
Reporting Unrecoverable Datafiles
Reporting Obsolete Backups and Copies
Deleting Obsolete Backups
Generating Historical Reports of Database Schema

8 Making Backups and Copies with Recovery Manager

Making Backups
Making Consistent and Inconsistent Backups
Making Whole Database Backups
Backing Up Tablespaces and Datafiles
Backing Up Control Files
Backing Up Archived Redo Logs
Making Incremental Backups
Making Image Copies
Monitoring Backup and Copy Operations
Correlating Server Sessions with Channels
Monitoring Progress
Monitoring Performance
Backup and Copy Scenarios
Reporting Datafiles Needing Backups
Skipping Files when Backing Up a Database
Spreading a Backup Across Multiple Disk Drives
Backing Up a Large Database to Multiple Filesystems
Specifying the Size of Backup Sets
Multiplexing Datafiles in a Backup
Backing Up Archived Redo Logs
Backing Up and Deleting Multiple Copies of an Archived Redo Log
Performing Differential Incremental Backups
Performing Cumulative Incremental Backups
Duplexing Backup Sets
Parallelizing Backup Sets
Backing Up in NOARCHIVELOG Mode
Backing Up in a Parallel Server Environment
Cataloging O/S Copies
Maintaining Backups and Copies
Handling Errors During Backups and Copies

9 Restoring and Recovering with Recovery Manager

Restoring Datafiles, Control Files, and Archived Redo Logs
Restoring a Database
Restoring Tablespaces and Datafiles
Restoring Control Files
Restoring Archived Redo Logs
Restoring in Preparation for Incomplete Recovery
Recovering Datafiles
Preparing for Media Recovery
Performing Complete Recovery
Performing Incomplete Recovery
Restore and Recovery Scenarios
Using Datafile Copies to Restore to a New Host
Restoring when Multiple Databases Share the Same Name
Performing an Irregular Restore of the Control File from a Backup Set
Recovering an Inaccessible Datafile in an Open Database
Recovering an Inaccessible Datafile Using Backups from Disk and Tape
Performing Recovery After a Total Media Failure
Recovering a Pre-RESETLOGS Backup
Recovering a Database in NOARCHIVELOG Mode

10 Creating a Duplicate Database with Recovery Manager

Creating a Duplicate Database: Overview
Obeying Restrictions
Generating Files for the Duplicate Database
Preparing the Auxiliary Instance for Duplication
Creating a Duplicate Database on a Local or Remote Host
Duplicating a Database on a Remote Host with the Same Directory Structure
Duplicating a Database on a Remote Host with a Different Directory Structure
Creating a Duplicate Database on the Local Host
Duplication Scenarios
Setting New Filenames Manually
Resynchronizing the Duplicate Database with the Target Database
Creating a Non-Current Duplicate Database

Part III Recovery Manager Reference

11 Recovery Manager Command Syntax

Conventions Used in this Reference
Command Entries
Summary of RMAN Commands
allocate
allocateForMaint
alterDatabase
archivelogRecordSpecifier
backup
catalog
change
cmdLine
completedTimeSpec
connect
connectStringSpec
copy
createCatalog
createScript
crosscheck
datafileSpec
debug
deleteExpired
deleteScript
deviceSpecifier
dropCatalog
duplicate
host
list
listObjList
printScript
recover
register
release
releaseForMaint
replaceScript
replicate
report
reset
restore
resync
rmanCmd
run
send
set
set_run_option
shutdown
sql
startup
switch
untilClause
upgradeCatalog
validate

12 Recovery Catalog Views

RC_ARCHIVED_LOG
RC_BACKUP_CONTROLFILE
RC_BACKUP_CORRUPTION
RC_BACKUP_DATAFILE
RC_BACKUP_PIECE
RC_BACKUP_REDOLOG
RC_BACKUP_SET
RC_CHECKPOINT
RC_CONTROLFILE_COPY
RC_COPY_CORRUPTION
RC_DATABASE
RC_DATABASE_INCARNATION
RC_DATAFILE
RC_DATAFILE_COPY
RC_LOG_HISTORY
RC_OFFLINE_RANGE
RC_PROXY_CONTROLFILE
RC_PROXY_DATAFILE
RC_REDO_LOG
RC_REDO_THREAD
RC_RESYNC
RC_STORED_SCRIPT
RC_STORED_SCRIPT_LINE
RC_TABLESPACE

Part IV Performing Operating System Backup and Recovery

13 Performing Operating System Backups

Listing Database Files Before Performing a Backup
Performing O/S Backups
Performing Whole Database Backups
Performing Tablespace and Datafile Backups
Performing Control File Backups
Recovering From a Failed Online Tablespace Backup
Using Export and Import for Supplemental Protection
Using Export
Using Import

14 Performing Operating System Recovery

What Is Media Recovery?
Restoring Files
Recovering Datafiles
Determining Which Files to Recover
Restoring Files
Restoring Backup Datafiles
Re-Creating Datafiles when Backups Are Unavailable
Restoring Necessary Archived Redo Log Files
Understanding Basic Media Recovery Procedures
Using Media Recovery Statements
Applying Archived Redo Logs
Recovering a Database in NOARCHIVELOG Mode
Recovering a Database in ARCHIVELOG Mode
Performing Media Recovery in Parallel
Performing Complete Media Recovery
Performing Closed Database Recovery
Performing Open Database Recovery
Performing Incomplete Media Recovery
Performing Cancel-Based Recovery
Performing Time-Based Recovery
Performing Change-Based Recovery
Opening the Database after Media Recovery
Deciding Whether to Specify RESETLOGS or NORESETLOGS
Guidelines for Opening in RESETLOGS Mode
Recovering a Pre-RESETLOGS Backup

15 Operating System Recovery Scenarios

Understanding the Types of Media Failures
Recovering After the Loss of Datafiles
Losing Datafiles in NOARCHIVELOG Mode
Losing Datafiles in ARCHIVELOG Mode
Recovering Through an ADD DATAFILE Operation
Recovering Transported Tablespaces
Recovering After the Loss of Online Redo Log Files
Recovering After Losing a Member of a Multiplexed Online Redo Log Group
Recovering After the Loss of All Members of an Online Redo Log Group
Recovering After the Loss of Archived Redo Log Files
Recovering After the Loss of Control Files
Losing a Member of a Multiplexed Control File
Losing All Copies of the Current Control File
Recovering from User Errors
Performing Media Recovery in a Distributed Environment
Coordinating Time-Based and Change-Based Distributed Database Recovery
Recovering a Database with Snapshots

16 Managing a Standby Database

Planning a Standby Database
Standby Database Advantages
Standby Database Requirements
Creating a Standby Database
Choosing the Standby Database Mode
Maintaining a Standby Database in Recovery Mode
Placing the Standby in Manual Recovery Mode
Placing the Standby Database in Managed Recovery Mode
Transmitting Archived Redo Logs to a Standby Database
Maintaining the Standby Database in Recovery Mode
Opening a Standby Database in Read-Only Mode
Activating a Standby Database
Altering the Physical Structure of the Primary Database
Adding Datafiles
Renaming Datafiles
Altering Redo Logs
Altering Control Files
Configuring Initialization Parameters
Taking Datafiles in the Standby Database Offline
Performing Direct Path Operations
Refreshing the Standby Database Control File
Using a Standby Database in an OPS Configuration

A Performing Tablespace Point-in-Time Recovery with Recovery Manager

Introduction to RMAN TSPITR
Planning for TSPITR
Performing TSPITR Without a Recovery Catalog
Understanding General Restrictions
Researching and Resolving Inconsistencies
Managing Data Relationships
Preparing the Auxiliary Instance for TSPITR
Performing TSPITR
Preparing the Target Database for Use After TSPITR
Responding to Unsuccessful TSPITR
Tuning TSPITR Performance
Specify a New Name for Datafiles in Auxiliary Set Tablespaces
Set the Auxiliary Name and Use a Datafile Copy for Recovery Manager TSPITR
Use the Converted Filename in the Auxiliary Control File
Summary: Datafile Naming Methods

B Performing Operating System Tablespace Point-in-Time Recovery

Introduction to O/S Tablespace Point-in-Time Recovery
TSPITR Advantages
TSPITR Methods
TSPITR Terminology
Planning for Tablespace Point-in-Time Recovery
TSPITR Limitations
TSPITR Requirements
Preparing the Databases for TSPITR
Step 1: Determine Whether Objects Will Be Lost
Step 2: Research and Resolve Dependencies on the Primary Database
Step 3: Prepare the Primary Database
Step 4: Prepare the Clone Parameter Files
Step 5: Prepare the Clone Database
Performing TSPITR
Step 1: Recover the Clone Database
Step 2: Open the Clone Database
Step 3: Prepare the Clone Database for Export
Step 4: Export the Metadata
Step 5: Copy the Recovery Set Clone Files to the Primary Database
Step 6: Import the Metadata into the Primary Database
Step 7: Prepare the Primary Database for Use
Step 8: Back Up the Recovered Tablespaces in the Primary Database
Performing Partial TSPITR of Partitioned Tables
Step 1: Create a Table on the Primary Database for Each Partition Being Recovered
Step 2: Drop the Indexes on the Partition Being Recovered
Step 3: Exchange Partitions with Stand-Alone Tables
Step 4:Take the Recovery Set Tablespace Offline
Step 5: Create Tables at Clone Database
Step 6: Drop Indexes on Partitions Being Recovered
Step 7: Exchange Partitions with Stand-Alone Tables
Step 8: Export the Clone Database
Step 9: Copy the Recovery Set Datafiles to the Primary Database
Step 10: Import into the Primary Database
Step 11: Bring Recovery Set Tablespace Online
Step 12: Exchange Partitions with Stand-Alone Tables
Step 13: Back Up the Recovered Tablespaces in the Primary Database
Performing TSPITR of Partitioned Tables When a Partition Has Been Dropped
Step 1: Find the Low and High Range of the Partition that Was Dropped
Step 2: Create a Temporary Table
Step 3: Delete Records From Partitioned Table
Step 4: Take Recovery Set Tablespaces Offline
Step 5: Create Tables at Clone Database
Step 6: Drop Indexes on Partitions Being Recovered
Step 7: Exchange Partitions with Stand-Alone Tables
Step 8: Export the Clone Database
Step 9: Copy the Recovery Set Datafiles to the Primary Database
Step 10: Import into the Primary Database
Step 11: Bring Recovery Set Tablespace Online
Step 12: Insert Stand-Alone Tables into Partitioned Tables
Step 13: Back Up the Recovered Tablespaces in the Primary Database
Performing TSPITR of Partitioned Tables When a Partition Has Split
Step 1: Drop the Lower of the Two Partitions at the Primary Database
Steps 2-13: Follow Same Steps as for Partial TSPITR of Partitioned Tablespaces
TSPITR Tuning Considerations
Recovery Set Location Considerations
Backup Control File Considerations
Performing TSPITR Using Transportable Tablespaces

Glossary

Index



Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Index