Oracle® Database Backup and Recovery Basics 10g Release 2 (10.2) Part Number B14192-02 |
|
|
View PDF |
The focus of this chapter is on how you use RMAN and backups created with RMAN to return your database to normal operation after the loss of one or more database files needed for its normal operation. The database files that RMAN backs up and can recover are the control file, server parameter file, datafiles and archived redo log files.
The chapter is organized as follows:
"Basic Database Restore and Recovery Scenarios" presents some common database restore and recovery scenarios in their entirety. If one of these scenarios matches your situation, then you can follow the procedure outlined here. Even if your situation is not an exact match for any of these, a review of the scenarios can help you create a plan for your own recovery process.
"Preparing and Planning Database Restore and Recovery" provides a general outlinie you can use to plan a restore-and-recovery operation, including how to determine which files need restore and recovery and what steps need to be taken during the recovery. It also describes how to preview the backups that RMAN will use during the restore operation, and how to verify that the backups to be used in the restore operation are valid.
"RMAN RESTORE: Restoring Lost Database Files from Backup" presents a number of recovery procedures in isolation, such as how to restore a control file, an SPFILE, individual datafiles and redo logs, along with requirements in the event that you restore a particular type of file, such as steps you must take if you are restoring from a backup control file. If your exact restore and recovery scenario is not one of the basic scenarios outlined in the chapter, you can follow the processes outlined here to perform the individual tasks in your recovery plan.
The two most important RMAN commands used in database recovery are:
RESTORE
, which retrieves files from RMAN backups based on the contents of the RMAN repository
RECOVER
, which performs complete or point-in-time media recovery using available datafiles and redo logs.
Typically, you will set the state of the database appropriately for the data recovery operation to be performed, allocate or configure channels required to communicate with the disk and media manager, and then run a series of RESTORE
and RECOVER
commands. RMAN retrieves all needed files from backup and performs media recovery on all restored datafiles, to return your database to the desired state.
This chapter introduces the techniques which will cover the most common restore and recovery scenarios. Anyone performing restore and recovery, even in complex scenarios not covered here, should be familiar with the techniques outlined in this chapter. Note, however, the following limitations on the scope of this discussion:
Most of this chapter will focus on restore-and-recovery scenarios in which a media failure has damaged some or all of your database files, and your goal is to return your whole database to normal operation by restoring the damaged files from backup and recover all database changes in the redo log. While some more advanced types of recovery, such as point-in-time recovery of the whole database or individual tablespaces to recover from user errors, are mentioned in passing, Chapter 7, "Performing Flashback and Database Point-in-Time Recovery" discusses these techniques in detail.
See Also:
|
While there may be passing references to using RMAN with a recovery catalog, details on how use of RMAN changes with a recovery catalog are covered in Oracle Database Backup and Recovery Advanced User's Guide.
The discussion in this chapter will be limited to Oracle databases running in a single-instance configuration. While RMAN can perform restore and recovery of databases in Real Application Clusters and Data Guard configurations, such scenarios are beyond the scope of this manual. After reviewing this chapter for the basics of backup and recovery, refer to Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide and Oracle Data Guard Concepts and Administration for more information about using RMAN in those contexts.
Enterprise Manager provides access to much of the database restore and recovery functionality provided by RMAN through a set of recovery wizards, that lead the DBA through a variety of recovery procedures based on an analysis of your database, your available backups and your data recovery objectives.
Using RMAN through Enterprise Manager, you can perform the simpler restore and recovery scenarios outlined in this chapter, as well as much more sophisticated restore and recovery techniques such as point-in-time recovery and even use of the flashback features of the Oracle database, which allow for efficent repair of both media failure and user errors.
While the underlying functionality is the same, and the command-line client provides more flexibility, in many common situations, use of the Enterprise Manager interface to RMAN's restore and recovery features will be simpler than using the RMAN command line client directly.
See Oracle Database 2 Day DBA for more details on the restore and recovery features of Enterprise Manager.