Skip Headers
Oracle® Database Backup and Recovery Quick Start Guide
10g Release 2 (10.2)

Part Number B14193-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

8 Managing the RMAN Repository

RMAN repository metadata is always stored in the control file of the target database. You can also create a recovery catalog in a separate database, and RMAN will record its metadata there as well.

Monitoring Control File Records

If you do not use a recovery catalog, then eventually RMAN control file records are overwritten. Set this initialization parameter in the parameter file of the target database to determine how long records are kept:

CONTROL_FILE_RECORD_KEEP_TIME = number_of_days_to_keep

Crosschecking Backups

The CROSSCHECK command checks whether RMAN backups and copies in the repository are still readable by RMAN. Assuming that you have configured automatic channels, you can run these commands:

RMAN> CROSSCHECK BACKUP; # checks RMAN backups on configured devices
RMAN> CROSSCHECK COPY; # checks RMAN image copies on configured devices

If backups are stored with a media manager and sbt channels are not configured, then you must allocate a maintenance channel before CROSSCHECK and DELETE commands on sbt devices:

RMAN>
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
   RMAN> CROSSCHECK BACKUP;

Deleting Backups Created with RMAN

The DELETE command removes RMAN backups and copies from DISK and sbt devices, marks the objects as DELETED in the control file, and removes the records from the recovery catalog (if you use a catalog). For example:

RMAN> DELETE BACKUPSET 101, 102, 103;
RMAN> DELETE CONTROLFILECOPY '/tmp/cf.cpy';
RMAN> DELETE NOPROMPT ARCHIVELOG UNTIL SEQUENCE = 7300;
RMAN> DELETE BACKUP OF SPFILE TABLESPACE users DEVICE TYPE sbt;
RMAN> DELETE BACKUP OF DATABASE LIKE '/tmp%'; # pattern match
RMAN> DELETE ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;

The following options of the DELETE command are also useful:

Parameter Example Explanation
EXPIRED DELETE EXPIRED Deletes the backups and copies marked as EXPIRED (that is, "not found") by the CROSSCHECK command.
OBSOLETE DELETE OBSOLETE Deletes the backups and copies that are obsolete under the retention policy. REDUNDANCY and RECOVERY WINDOW parameters override the configured policy.
NOPROMPT DELETE NOPROMPT OBSOLETE Specifies that you do not want to be prompted to confirm the files to be deleted.

Cataloging and Uncataloging Backups and Copies

The CATALOG command adds information about useable backups to the RMAN repository. Use this command to record backups created with tools other than RMAN, such as datafile copies created with operating system-level utilities. You can also use this command if you have backups which are created using RMAN but which are no longer listed in the RMAN repository. RMAN can use these backups in restore and recovery operations. For example:

RMAN> CATALOG DATAFILECOPY '/backup/users01.bak'; # copy made with operating system copy cmd
RMAN> CATALOG LIKE '/backup' 

Note that the second example adds all usable backups where the filepath begins with /backup to the RMAN repository, including files in the directory /backup/users01.bak, files in subdirectories such as /backup/tuesday/users01.bak.old, and files in directories whose name starts with /backup, such as /backup-2001/users01.bak.old. Take care when choosing your argument for CATALOG LIKE.

The CHANGE ... UNCATALOG syntax lets you remove information about backups and copies from the RMAN repository. If you manually delete a backup using operating system commands, CHANGE...UNCATALOG updates the repository to reflect that change. For example:

RMAN> CHANGE CONTROLFILECOPY '/tmp/cf.cpy' UNCATALOG;
RMAN> CHANGE BACKUPSET 121,122,127,203,300 UNCATALOG;