Professional Documents
Culture Documents
Recovery Manager is a tool manages the process of creating backups and also manages the process
of restoring and recovering from them.
The RMAN environment consists of the utilities and databases that play a role in backing up our data.
At minimum the environment for RMAN must include the following:-
1. FLASH RECOVERY AREA:- a disk location in which the DB can store and manage files
related to Backup and recovery. It is the automatic disk-based backup and recovery feature
simplifies managing disk space and files related to backup and recovery.
3. RECOVERY CATALOG:- A separate database schema used to record RMAN activity against
One or more target databases. It holds the actual RMAN stored scripts, sequences of RMAN
commands for common backup tasks. Centralized storage of scripts in the recovery catalog can
be more convenient than working with command files.
Main Components
4. RMAN Client:- Is a command line oriented database client, much like SQL plus with its own
command syntax. From the RMAN client we can issue RMAN commands and SQL statements to
perform and report on backup and recovery operations.
5. RMAN Repository: RMAN maintains metadata about the target database and its backup and
recovery operations in the RMAN repository. RMAN repository data is always stored in the control
file of the target database. The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter
controls how long backup records are kept in the control file.
Database backups with RMAN are actually quite easy. Your database can be in one of two modes,
ARCHIVELOG or NOARCHIVELOG mode. The mode your database is in determines what kinds of
backups you can perform on your database
It will show how to perform an offline (or cold) backup using RMAN. This will require that the
database be down (that’s why it’s called an offline backup).
This is the location that all the disk backups will be made to. To configure the flash
recovery area we will use the alter system command to set the value of two database
parameters:
NOTE:- You may need to assign your flash recovery area more space depending on the
following factors:
Here is an example of configuring the flash recovery area for the settings:-
SQL>sqlplus /nolog
SQL>conn /as sysdba
SQL>connected
SQL>
SQL>
SQL>
SQL>
Now that RMAN and the database are configured, we are ready to proceed to backup the database.
Offline backup is a backup of the database while it is not running. Hence, to perform our backup we
will shutdown the database from RMAN and then mount the database. We will perform the backup.
Once the backup is complete we will restart the database again. Here is an example of this process:
RMAN>connect target;
RMAN>Shutdown immediate
RMAN>Startup mount;
RMAN>backup database;
It will run some auto generated scripts on the screen and the backup will be done.
RMAN>exit
C:\set ORACLE_SID=HRTEST
C:\sqlplus /nolog
Once this process is complete, you have completed your first backup. Recall that we configured a
redundancy of 2 for the backups. RMAN will reclaim the space from the flash recovery area
automatically as required, removing all unneeded backups.
As the name implies, an online backup allows you to backup the database while users are
working.
Here is the RMAN command that you will use to kick off a backup of your database:
This command will backup your database. Along with the database backup, it will backup all the
archived redo logs that have been generated by your database. These archived redo logs are very
important to be able to recover your database so we back them up at the same time.
Note in both examples the use of the delete input command. This will cause the source archive redo
logs to be removed once they are backed up. Don’t worry, the delete input command will not try to
delete your database or datafiles.