Rman cannot delete archived logs after upgrading to 12.1.0.2 in oracle

Source: Internet
Author: User


The customer has a database with a 2-location and 3-center architecture. The local database has primary and standby, and the remote database also has a standby.

Primary's rman archivelog deletion policy is ship to all standby
The rman archivelog deletion policy of standby in the same city is backup 1 time, which is performed on standby in the same city.
The rman archivelog deletion policy for remote standby is applied on all standby.

One day, we found that FRA is full, and FRA has accumulated a large number of required logs, which are not automatically deleted. When you manually delete archived logs, an error is also reported:

RMAN-08120: WARNING: archived log not deleted, not yet applied by standby

Logs can be forcibly deleted only when the force parameter is added.

This problem occurs because the default behavior of deleting Archived logs has changed in 12.1.0.2. In the past, the defer path was not considered in 11g. If The defer path exists at 12.1.0.2, the error log is not applied, even if the logs are actually applied.

This behavior has changed and is related:

Bug 16082541 RMAN DELETES ARCHIVELOGS WHICH HAVE NOT BEEN APPLIED TO A DEFERRED STANDBY
Which was fixed in 12.1.0.2, (but has changed behaviour in handling of deleting logs)

Changed behaviour:
-> Destinations that are marked DEFERRED (and valid_now = 'unknown ') are considered in 12.1.0.2 before deleting logs.

In this environment, the customer sets log_archive_dest_n (this is for the convenience of continued standby when switchover ):
In primary, log_archive_dest_2 is set to remote standby, log_archive_dest_state_2 is enable, log_archive_dest_3 is standby in the same city, and log_archive_dest_state_3 is enable.
Set log_archive_dest_2 to primary in standby, log_archive_dest_state_2 to defer, log_archive_dest_3 to remote standby, and log_archive_dest_state_3 to defer.
Set log_archive_dest_2 to primary in remote standby, log_archive_dest_state_2 to defer, log_archive_dest_3 to stanby in the same city, and log_archive_dest_state_3 to defer.

In this way, when switchover is used, you only need to change the defer parameter to enable, and then you can continue to do the consumer uard.

However, this is because of the parameter settings and the change in the log deletion rule of 12.1.0.2, which causes remote standby. Because the rule is applied on all standby and is set to defer, therefore, it cannot be deleted.

Check on remote standby
SQL> SELECT * from v $ archive_dest where (valid_now = 'unknown 'AND status = 'referred ');

Two rows of records are returned, namely, primary and local standby.

Currently, you can refer to the following solutions:
1. Do not change log_archive_dest_state_n and set log_archive_dest_n =''
2. Do not cancel log_archive_dest_state_n and change log_archive_dest_n to enable
3. alter system set "_ deferred_log_dest_is_valid" = false
4. Change the archivelog deletion policy from applied on all standby to applied on standby.

Related Article

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.