What is RMAN ?

RMAN (Recovery Manager) is a Oracle Utility used as a backup and recovery manager for Oracle databases (from Oracle release 8.0).

It provides database backup, restore, and recovery capabilities addressing high availability and disaster recovery concerns. Oracle Corporation recommends RMAN as its preferred method for backup and recovery. RMAN as a command-line executable from the operating system prompt or use some RMAN features through the Enterprise Manager GUI.



Commonly used methods for backup

* User managed backup
* RMAN backup (oracle recommended)
* Data Pump Export

Summary of RMAN Commands

@filename – Reads in a command file; executes each command in it in order
ADVISE FAILURE – Display repair options
ALLOCATE CHANNEL – Establish a channel
RELEASE CHANNEL – Release a channel
ALTER DATABASE – Mount or open a database
LIST – Lists the backups and copies recorded in the repository
BACKUP – Backs up database files, archived logs, backups, and copies
CHANGE – Updates status of a backup or copy in the RMAN repository
CATALOG – Add information about file copies and user-managed backups to the repository
RESYNC CATALOG – Perform a full resynchronization
CONFIGURE – Change persistent RMAN configuration settings
CROSSCHECK – Checks whether backup pieces, proxy copies, and disk copies still exist
VALIDATE – Examine a backup set and report whether its data is intact
DELETE – Deletes backups and copies from disk or tape media, and updates the RMAN repository accordingly
RECOVER – Performs media recovery from RMAN backups and copies
REPORT – Reports backup status of your database: which files are in the database, which files need backups, and which backups are obsolete or unrecoverable
RESTORE – Restores RMAN backups and copies
RUN – Some RMAN commands are only valid inside a RUN block RUN { …. }
SET – Creates settings that apply only to the current RMAN session
SHOW – Displays the currently enabled CONFIGURE commands
SPOOL – Write RMAN output to a log file
HOST – Invoke an operating system command-line subshell from within RMAN
Show all the RMAN parameters from the database

RMAN> show all;

RMAN channel is a connection to a database server session

Configure the disk channel on default location


Configure the disk channel for Disk


Here, RMAN automatically replaces

%t – four byte time stamp
%s – backup set number
%p – backup piece number

Configure the disk channel for SBT (System Backup to Tape)


Configure the disk channel for ASM Disk


Backup the database using the standard RMAN parameters

RMAN> backup database;

List all of the current backups for the database

RMAN> list backup;

List Backup summary

RMAN> list summary;

Crosscheck backups to see if they still exist

RMAN> crosscheck backup;

Crosscheck archive logs to see if they still exist

RMAN> crosscheck archivelog all;

Remove any expired backup

RMAN> delete expired backup;

Remove any expired archivelos

RMAN> delete expired archivelog;

Report of files that need backup due to unrecoverable operations

RMAN> report unrecoverable;

Report the obsolete backups and archivelogs

RMAN> report obsolete;

Delete the obsolete backups and archivelogs

RMAN> delete obsolete;

List all of the archivelogs

RMAN> list archivelog all;

Delete a specifed backupset

RMAN> delete backupset 1344

Delete archive logs up to log sequence number

RMAN > delete archivelog until sequence = <sequence#>;

list archivelogs from yesterday.

RMAN> list archivelog time between “sysdate -1” and “sysdate”

Delete archivelogs backed up 1 time to disk

RMAN> delete archive log all backed up 1 times to disk;

Delete backups older than 15 days

RMAN> delete backup completed before ‘sysdate -15’;

Restore archivelog between to SCN numbers

RMAN> restore archivelog scn between 12345 and 12350;

Check For Logical And Physical Block Corruption

RMAN> backup check logical validate database;

** NOTE : SCN # & Log Sequence # are different **

Log Sequence number – A number that uniquely identifies a set of redo records in a redo log file. When the database fills one online redo log file and switches to a different one, the database automatically assigns the new file a log sequence number.
SCN – System Change Number. A database ordering primitive. The value of an SCN is the logical point in time at which changes are made to a database.

Leave a Reply