Friday 30 May 2014

RMAN feature to delete the archive logs applied on Standby

This is a feature in RMAN to automatically purge archivelogs from the FRA once they are applied to the standby database.
APPLIED ON STANDBY: enables flash recovery area to delete archivelogs that are applied on mandatory standby.

Pre 11g Set the following Parameter and restart the database
SQL> alter system set "_log_deletion_policy"='ALL' scope=spfile;

Configure the following parameter in RMAN (primary and standby):

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

Now define the FRA accordingly, so that when there is a space pressure in FRA it would delete the archive logs and you would see a message in the alert log as follows:
Deleted Oracle managed file +ARCH/AGPROD/archive_1_3926_820676398.arc
Deleted Oracle managed file +ARCH/AGPROD/archive_1_3927_820676398.arc

This would help in better maintenance of archive log and accidental loss of archive logs.