6.1 Database Restore and Recovery with RMAN: Overview

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.

6.1.1 Scope and Limitations of this Chapter

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:

6.1.2 Restore and Recovery with Enterprise Manager

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.