RMAN: Configure an archive log deletion policy

Source: Internet
Author: User
In Oracle11g, in addition to following the RMAN retention policy, you can also use RMAN to configure the deletion policy for archiving logs, that is, when logs can be archived

In Oracle 11g, in addition to following the RMAN retention policy, you can also use RMAN to configure the deletion policy for archiving logs, that is, when logs can be archived

In Oracle 11g, in addition to following the RMAN retention policy, you can also use RMAN to configure the deletion policy for archiving logs, that is, when archiving logs can be deleted. The archive log deletion policy applies to all archiving locations (FRA/FRA is not used in the flash back area ). This document describes and demonstrates how to delete an archive log.

1. archiving log deletion policies
That is, which archive logs can be deleted when they comply with the deletion policy. As described above, the archive location applies to all archive locations (FRA in the fast flash back area/FRA is not used)
When this policy is enabled, if archive logs exist in FRA, Oracle will keep them as much as possible. Once FRA space is in a hurry, Oracle will automatically delete the archive log based on the deletion policy.
For logs not archived in FRA, you must manually delete the logs using delete obsolete or delete archivelog.
Whether the archived log exists in or out of FRA, It can be deleted through BACKUP... delete input or delete archivelog.
This policy is not applicable to external archive log files that are transferred from the primary database to the logical standby using LogMiner, because these log files cannot be backed up or restored on the logical standy.

2. Configure an archiving log deletion policy
Use the following method to configure an archive log deletion policy
Configure archivelog deletion policy to backed up 2 times to sbt;
Configure archivelog deletion policy to backed up 1 times to device type disk;
Configure archivelog deletion policy to applied on standby;
Configure archivelog deletion policy to shipped on standby;
Configure archivelog deletion policy clear;
This feature is not available for Oracle 10 Gb, but there is a similar configuration for the number of times archive logs are backed up, as shown below;
Configure archivelog backup copies for device type disk to $ {archiveretention };


3. Disable the archive log deletion policy.
By default, this policy is set to none. That is to say, according to The RMAN backup retention policy, archive logs in FRA are deleted once (to disk or tape)
If Oracle no longer requires the current archive log to ensure database point-in-time recovery or database flash back, The RMAN backup retention policy considers the current log as obsolete
Archive logs created after SYSDATE-'db _ FLASHBACK_RETENTION_TARGET 'must be retained.


4. Enable the archive log deletion policy
Once this policy is enabled, the specified archive logs can be deleted after the backup quantity reaches the set value.
Backup archivelog backs up archive logs to a specified location without exceeding the specified number of backups (for example, set to 2). For example, if the number of backups exceeds 2, then RMAN skips the archive logs that have been backed up twice.
The force option can be applied for backup archivelog to forcibly back up and archive logs.
If this policy is enabled and configured as the applied on standby clause, all the forced standby locations are APPLIED, and these archived logs are deleted by RMAN.
If this policy is enabled and configured as the shipped on standby clause, all the forced standby locations will be deleted by RMAN after being successfully transferred.

For more details, please continue to read the highlights on the next page:

Recommended reading:

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.