Configure RMAN to delete archive logs that have been applied to the standby Database
In DataGuard configuration, sometimes we need to use RMAN to automatically delete archive logs that have been applied to the slave database from FRA. When the following conditions are met, the archived logs under FRA will be automatically deleted.
1) if the mandatory ARCHIVELOG target is not used before 11 GB, the database (master and slave databases) must change the following parameters and restart:
SQL> alter system set "_ log_deletion_policy" = 'all' scope = spfile;
2) configure the following parameters in RMAN ):
RMAN> configure archivelog deletion policy to applied on standby;
Warning if applied on standby is set for 10 Gb, files in FRA will be cleared even if no backup is available.
11g: Starting from 11g, we have enhanced the configuration of the deletion policy for archiving logs, including the applied on [ALL] STANDBY [backed up n times to device type] Option. This option confirms that the archive log has been applied and can be cleared only after the master database has been backed up.
3) Archived logs must be applied to the standby database. Run the following query to list all archived logs that have been applied to the standby database:
Select a. thread #, a. sequence #, a. applied
From v $ archived_log a, v $ database d
Where a. activation # = d. activation #
And a. applied = 'yes'
/
4) FRA has space pressure.
When the archived log is automatically deleted from FRA, the alert. log of the database reports the following information:
Deleted Oracle managed file/opt/app/oracle/FRA/ORA102/archivelog/2014_09_12/o1_mf_1_151_6y71q675 _. arc
Deleted Oracle managed file/opt/app/oracle/FRA/ORA102/archivelog/2014_09_12/o1_mf_1_151_6y87pzg4 _. arc
-------------------------------------- Recommended reading --------------------------------------
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------