RMAN Enhancements in Oracle9i
October 1, 2001
Recovery Manager (RMAN) is an Oracle utility that can back up, restore, and recover database files. The product is a feature of the Oracle database server and does not require separate installation.Recovery Manager uses database server sessions to perform the work of backup and recovery. It stores metadata about its operations in the control file of the target database and, optionally, in a recovery catalog schema in an Oracle database.
RMAN was initially introduced in Oracle 8 and lot of new features that made RMAN more powerful were added in Oracle 8i. With the introduction of Oracle 9i, Oracle improved this tool to have many more new features that make the database administrators life much easier.
Persistent RMAN Configurations
A CONFIGURE command has been introduced in Oracle 9i, that lets you configure various features including automatic channels, parellelism, backup options etc., that can persist across sessions and be available to any session. For example, the CONFIGURE command may be used to store channel configurations and RMAN will automatically assignt the channels as needed without having to specify the channel allocation as a part of the script. These automatic allocations and options can be overridden by commands in an RMAN command file.
Control File Auto Backups
Many of the database administrators stayed away from using RMAN citing the reliance of RMAN on control files / recovery catalog for backup and recovery options. Now you need not worry about a lost recovery catalog or a lost control file. Control File Auto Backups give the dba a way to restore the backup repository contained in the control file when a control file and the recovery catalog are both lost. For some of us using the nocatalog option this comes in very handy when we have to recover without having the control file that was used for the RMAN backup.
To use this feature, CONFIGURE CONTROLFILE AUTOBACKUP should be set to ON, and RMAN will automatically perform a control file autobackup after every BACKUP or COPY command is issued whether its in a RUN Block or at the command prompt. This control file backup occurs in addition to any control file backup that has been created as a part of the database backup.
Block Media Recovery
RMAN introduces a new blockrecover command to recovery individual datablocks within a data file. This reduces the Mean Time to Recovery ( MTTR ) for a large datafile when individual blocks within the file are reported as corrupt. Without this feature, even if a single block is corrupted the dba has to restore the whole datafile and recovery using the archived redo logs that were generated since that backup was created.
This procedure is useful when a trace file or standard output reveals that a small number of blocks within a datafile are corrupt. A major restriction is that you can only recover from a full RMAN backup and incremental backups cannot be used for this type of recovery. Also only complete recovery can be performed on individual blocks cand you cannot stop the redo application while the recovery is in progress.
Block Media recovery can be performed by using a command at the RMAN command prompt similar to the one given below.
Oracle has enhanced RMAN in oracle 9i with lot many features that make the job of the dba more error free by enhancing the CHANGE, CROSSCHECK, DELETE and LIST commands. Also RMAN automatically switches out the online redo log before backing up the archived redo logs to guarantee that the backups can be restored to a consistent state. One cool feature I like is the "NOT BACKED UP SINCE " clause that allows RMAN to backup only those files that were not backed up after a specified time. So, f a backup fails partway through, you can restart it and back up only those files that were not previously backed up.