Get in touch: [email protected]

Restoring and Recovering the Entire Database – RMAN Backups and Reporting

The RESTORE DATABASE command will restore every data file in your database. The exception to this is when RMAN detects that data files have already been restored; in that case, it will not restore them again. If you want to override that behavior, use the FORCE command.

When you issue the RECOVER DATABASE command, RMAN will automatically apply redo to any data files that need recovery.

The recovery process includes applying changes found in the following files:

•     Incremental backup pieces (applicable only if using incremental backups)

•     Archivelog files (generated since the last backup or incremental backup applied)

•     Online redo log files (current and unarchived)

You can open your database after the restore-and-recovery process is complete. Complete database recovery works only if you have good backups of your database and access to all redo generated after the backup was taken.

You need all the redo required to recover the database data files. If you do not have all the required redo, then you will most likely have to perform an incomplete recovery (see the section “Incomplete Recovery” later in this chapter).

Your database has to be at least mounted to restore data files, using RMAN. This is because RMAN reads information from the control file during the restore-and-recovery process.

You can perform a complete database-level recovery with either the current control file or a backup control file.

Using the Backup Control File

This technique uses an autobackup of the control file retrieved from the FRA. This situation works for having to restore a control or in case of media loss when the control file is no longer available. In this scenario, the control file is first retrieved from a backup before restoring and recovering the database:

$ rman target /

RMAN> startup nomount;

RMAN> restore controlfile from autobackup; RMAN> alter database mount;

RMAN> restore database; RMAN> recover database;

RMAN> alter database open resetlogs;

If successful, the last message you should see is this:

Statement processed