Well, purge up archivelog is always a part of DBA duties, and very import in space management. However, Oracle dos provide capacity which help us to purge archivelogs in standby database automatically.
It requires 2 things:
1) flash recovery area is enabled
SQL> alter system set DB_RECOVERY_FILE_DEST=’/d01/fra’;
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=100G;
SQL> alter system set LOG_ARCHIVE_DEST_1=’LOCATION=USE_DB_RECOVERY_FILE_DEST’;
2) archivelog deletion policy is set for standby database
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
After above 2 steps are done. Oracle will automatcially purge archivelogs in flash recovery area in standby database when it facing space pressures.
Important Note: RMAN archivelog deletion policy in standby database will lost if it synced with RMAN catalog database while primary database has not enable this policy. Quick workaround is schedule a script to forcelly keep this policy in standby database once it got overwrited.