Databases Reference
In-Depth Information
Deleting Archived Redo Logs
Problem
You want to manually delete some unneeded archived redo logs.
Solution
You can delete any eligible archived redo log by using the delete archivelog or backup ... delete input
command. Here's an example showing how to delete all archived redo logs with the delete archivelog all
command:
RMAN> delete archivelog all;
The delete archivelog all command deletes all archived redo logs on disk that aren't necessary to meet
the configured archived redo log deletion policy. It's more likely that you would want to use the following delete
command, which deletes archived redo logs from disk based on whether they have been first backed up to tape a
certain number of times:
RMAN> delete archivelog all
backed up 3 times to sbt;
You can delete specific archived redo logs by using the delete command, as shown in the following example:
RMAN> delete archivelog until sequence = 999;
The backup ... delete command lets you first back up an archived redo log and then delete the source
archived redo log file. To delete the source file, you use the additional clause delete input , as shown in the following
example:
RMAN> backup device type sbt
archivelog all
delete all input;
The previous backup ... delete command backs up all the archived redo logs and then deletes all those
archived redo logs (input files). The delete all input clause results in the deletion of all backed-up archived redo
logs from all archived redo log destinations. If you want to delete only the specified archived redo log that you've just
backed up to a backup set, use the delete input clause instead, as shown in the following example:
RMAN> backup archivelog like '/arch%'
delete input;
Note that it's common to use the backup ... delete command to back up archived redo logs to tape and then
delete the source files.
How It Works
RMAN uses the configured archived redo log deletion policy to determine which of the archived redo logs are eligible
for deletion, including those archived redo logs that are stored in the flash recovery area. RMAN automatically deletes
the eligible archived redo logs from the flash recovery area. An archived redo log is considered eligible for deletion
when the flash recovery area becomes full.
 
Search WWH ::




Custom Search