Databases Reference
In-Depth Information
Solution
Use the delete or backup ... delete command to remove both archived redo logs and RMAN backups. You can
remove backup sets, image copies, proxy copies, and archive log backups through the delete command. The most
general form of the delete command is delete backup . This command deletes all backup pieces for the target
database that are recorded in the RMAN repository. Here's an example:
RMAN> delete backup;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1 1 1 1 AVAILABLE DISK /u01/app/oracle/fast_recovery_area/CATDB/
backupset/2012_09_28/o1_mf_nnndf_TAG20120928T102135_86cj409w_.bkp
2 1 2 1 AVAILABLE DISK /u01/app/oracle/fast_recovery_area/CATDB/
backupset/2012_09_28/o1_mf_nnndf_TAG20120928T102135_86cj53od_.bkp
3 1 3 1 AVAILABLE DISK /u01/app/oracle/fast_recovery_area/CATDB/
backupset/2012_09_28/o1_mf_nnndf_TAG20120928T102135_86cj5lwd_.bkp
4 2 1 1 AVAILABLE DISK /u01/app/oracle/fast_recovery_area/CATDB/
backupset/2012_09_28/o1_mf_ncnnf_TAG20120928T102135_86cj5x8x_.bkp
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=/u01/app/oracle/fast_recovery_area/CATDB/backupset/2012_09_28/o1_mf_nnndf_
TAG20120928T102135_86cj409w_.bkp RECID=1 STAMP=795176496
...
Deleted 4 objects
RMAN>
RMAN always prompts you for confirmation before going ahead and deleting the backup files. You can issue the
delete noprompt command to suppress the RMAN confirmation prompt. You can use the delete command with
various options, as shown in the following examples:
RMAN> delete backuppiece 999;
RMAN> delete copy of controlfile like '/u01/%';
RMAN> delete backup tag='old_production';
RMAN> delete backup of tablespace sysaux device type sbt;
In some special situations, you may want to delete all backups—including backup sets, proxy copies, and image
copies—belonging to a database. This can happen when you decide to drop a database and get rid of all of its backups
as well. Use a pair of crosscheck commands first, one for backups and the other for the image copies, to make sure
the repository and the physical media are synchronized. Then issue two delete commands, one for the backups and
the other for the copies. Here are the commands:
RMAN> crosscheck backup;
RMAN> crosscheck copy;
RMAN> delete backup;
RMAN> delete copy;
 
Search WWH ::




Custom Search