Thursday, July 2, 2015

How to automatically purge Applied Archive Logs on Data Guard Standby Database?

In this quick post, i will show how to have RMAN automatically purge Applied Archive Logs on the Data Guard Standby Database in 11g onwards.
Prior to 11g:
SQL> alter system set "_log_deletion_policy"='ALL' scope=spfile;
Reboot the database.

11g onwards (Enhanced Feature-set):
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
The following MOS Notes serve as a good reference for the above:
  • Configure RMAN to purge archivelogs after applied on standby (Doc ID 728053.1)
  • RMAN Archived Redo Logs Are Deleted Before Being Applied at Standby Database (Doc ID 740322.1)
  • RMAN backups in Max Performance/Max Availability Data Guard Environment (Doc ID 331924.1)
  • Bug 6216036 : RMAN+DG ARCHIVELOG DELETION POLICY APPLIED ON STANDBY NOT RESPECTED