deleting Archive Redo logs file
Deleting Archived Redo logs :
You can delete any eligible archived redo log by using the delete archivelog or backup…delete input 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’d want to use the following delete command, which deletes archvied redo logs from disk based on whether
they have been first backed up to tape a certain number of times.
RMAN>delete archivelog until sequence – 999;
the backup…delete command lets you first backup an archived redo log and then delete the source archived redo log file.
In order to delete the source file, you use the additional clause delete input,
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 archvied 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,
RMAN>backup archiveloglike ‘/arch%’ delete input;
backup…delete command to back up archived redo logs to tape and then delete the source files.
How?
RMAN uses the configured archived redo log deletion policy to determine which of the archvied redo logs are eligible for deletion, including those archived redo logs that
are stored in the FRA, RMAN automatically deletes the eligible archived redo logs from the flash recovery area.
An archived redo logs is considered eligible from deletion when the flash recovery area becomes full.
Suppose you have configured the following archived redo log deletion policy:
RMAN>configure archivelog deletion policy
to backed up 2 times to device type sbt;
The above command that all archived redo log files will be eligible for deletion from all locations when those files have been backed up twice or more to tape.
Once you set the archvied redo log deletion policy shown here, a delete archivelog all or backup…delete input command will delete all archived redo logs that satisfy the requirements of your configured deletion policy,which requires that rman back up all archived redo logs to tape twice.
If you haven’t configured an archived redo log deletion policy( by default there is no policy set), RMAN will deem any archied redo log file in the flash recovery area eligible for deletion, If following true,
- The archived redo logs have been successfully sent to all the destinations specified by the log_archive_dest_n parameter
- you have copied the archvied redo lgos to disk or tape at least once or the archived redo logs are obsolete per hour configured retention policy.
Use the configure archivelog deletion policy command to specify your own archive redo log deletion critieria of leaving the deletion timing to RMAN.
Once you configure an archived redo log deletion policy,it applies to all archived redo log locations, including FRA,if you’ve configured one.
RMAN stores the archived redo logs as long as possible in the FRA. When the flash recovery area is under space pressure, RMAN tries to ensure that any flashback retention time you’ve set is being satisfied before automatically deleting the archvied redo logs.
RMAN deletes eliggible archived redo lgos stored in all areas other than the flash recovery area when you execute one of the two deletion commands shown in the solution section of the receipe, backup…delete input or delete archivelog.
*If you execute the delete command with the force option, RMAN will ignore any configured archived redo log retention policies and deletes all the specified archived redo logs.