Archive log files which are used by SQL apply process at Logical Standby database is said to be Foreign Archive Logs or Remote Archived Logs. Foreign Archive log files are managed by SQL Apply process.

To know more about it Oracle Dataguard

After all the redo entries of Archive log files are applied using SQL apply process, these files are kept for a specific amount of time, a time set for LOG_AUTO_DEL_RETENTION_TARGET or for 1440 minutes if LOG_AUTO_DEL_RETENTION_TARGET is not specified. Once the timer exceeds this limit, Archive log files are automatically deleted.

Note: If you are using a flash recovery area, auto-deletion is based on the flash recovery area’s space pressure.

You can enable and disable the auto-delete feature for archived redo logs by using the DBMS_LOGSTDBY.APPLY_SET procedure. By default, the auto-delete feature is enabled.

To disable automatic deletion of archive logs we can use the following command.

If you are overriding the default automatic log deletion capability, periodically perform the following steps to identify and delete archived redo log files that are no longer needed by SQL Apply:

To purge the logical standby session of metadata that is no longer needed, enter the following PL/SQL statement:

This statement also updates the DBA_LOGMNR_PURGED_LOG view that displays the archived redo log files that are no longer needed.

Query the DBA_LOGMNR_PURGED_LOG view to list the archived redo log files that can be removed:

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.