Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

File Deletion Policy from Flash Recovery Area

File Deletion Policy from Flash Recovery Area

Flash Recovery Area (FRA) is used to set up a disk area where the database can create and manage a variety of files related to backup and recovery. If database level flashback is on then oracle creates flashback logs into flash recovery area. Also oracle creates archived logs in the flash recovery area. RMAN can store its backup sets and image copies in the flash recovery area too.

By default if flash recovery area is enabled then any backups of tablespace, datafile, database, spfile, controlfile and archived logs go to flash recovery area. The site of flash recovery area is set by the parameter db_recovery_file_dest_size parameter and its location is specified by db_recovery_file_dest parameter. Now if the total file size inside flash recovery area is about to reach the limit then the files that are to be deleted to reclaim space is determined by RMAN backup retention policy. Oracle Database does not delete eligible files from the flash recovery area until the space must be reclaimed for some other purpose. Thus, files recently moved to tape are often still available on disk for use in recovery. The recovery area can thus serve as a cache for tape. When the flash recovery area is full, Oracle Database automatically deletes eligible files to reclaim space in the recovery area as needed.

Based on the space in your flash recovery area oracle database will generate alert. The database issues a warning alert when reclaimable space is less than 15% and a critical alert when reclaimable space is less than 3%. When the recovery area is completely full and oracle sees there is no files for deletion from the flash recovery area, it will throw following errors,

ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim nnnn bytes disk space from mmmm limit

where nnnn is the number of bytes required and mmm is the disk quota.

So before you hit this error you should know which files from FRA should be eligible for deletion and which are not. I have made a list based on deletion policy.

1) Permanent files are never eligible for deletion. For example multiplexed redo log files and control files are part of database, that means they are permanent files and so they are never eligible for deletion.

2) Files that are obsolete under the retention policy are eligible for deletion. For example you set up CONFIGURE RETENTION POLICY TO REDUNDANCY 1 in RMAN configuration parameter but you have more than 1 copy backup and your FRA is under space pressure, then oracle can delete older copies of backup. In the same way if you configure RMAN to recovery window of 7 days and you have backups more than 7 days and those older backups are not needed to recover database in any point within 7 days then those older files than 7 days are eligible for deletion from FRA.

3) Transient files that have been copied to tape are eligible for deletion.

4) Archived redo logs are not eligible for deletion until all the consumers of the logs have satisfied their requirements ( If Archived Redo Log Deletion Policy is set ).
Note that, the default settings of archive log is
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
which mean by default archive logs are never eligible for deletion.

5) Foreign archived logs that have been mined by a LogMiner session on a logical standby database are eligible for deletion. Unlike an ordinary archived redo log, a foreign archived redo log has a different DBID.

6) If retention policy is set to none then no files will be eligible for deletion. But note that if files are never considered obsolete, then a file can only be deleted from the flash recovery area if it has been backed up to some other disk location or to a tertiary storage device such as tape.

You can monitor flash recovery area space by following two views

A) V$RECOVERY_FILE_DEST : To find out the current location, disk quota, space in use, space reclaimable by deleting files, and total number of files in the flash recovery area.

B) V$FLASH_RECOVERY_AREA_USAGE : To find out the percentage of the total disk quota used by different types of files, how much space for each type of file can be reclaimed by deleting files that are obsolete, redundant, or already backed up to tape.

October 4, 2008 - Posted by | oracle

1 Comment »

  1. Thanks a lot for sharing this with all of us you actually recognize what you are talking approximately!
    Bookmarked. Please additionally talk over with my web site =).
    We will have a hyperlink alternate contract among us

    Comment by www.ygstyle.com | March 8, 2013 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: