Flash recovery area is a disk location in which the database can store and manage files related to Backup and Recovery. To setup a flash recovery area, you must choose a directory location or Automatic Storage Management disk group to hold the files. FRA cannot be stored on a raw file system.
Flash recovery area simplifies the administration of your database by automatically naming recovery-related files, retaining the files as long as they are needed for restore and recovery activities, and deleting the files when they are no longer needed to restore your database and space is needed for some other backup and recovery-related purpose.
To Setup Flash Recovery Area (FRA), you just need to specify below two parameters.
1. DB_RECOVERY_FILE_DEST_SIZE (Specifies max space to use for FRA)
2. DB_RECOVERY_FILE_DEST (Location of FRA)
The DB_RECOVERY_FILE_DEST_SIZE must be set before DB_RECOVERY_FILE_DEST.
You can initialize these parameters by adding them in “init.ora” file or setting them using ALTER SYSTEM SET command or DBCA (Database Configuration Assistant).
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=10G scope=both
SQL> ALTER SYSTEM SET db_recovery_file_dest='/oradata/FRA;
For example, If FRA is a Automatic Storage Management (ASM) disk group
SQL> ALTER SYSTEM SET db_recovery_file_dest='+FLASH’sid='*’ ( sid=’*’, if using RAC)
In a RAC database, all database instances MUST have the same values for these parameters.
Disable the Flash Recovery Area:
To disable FRA set the DB_RECOVERY_FILE_DEST initialization parameter to a null string.
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '' scope=both;
Monitor the Flash recovery area using Dynamic performance views
To find out the current flash recovery area location, disk quota and current usage in flash recovery area query V$RECOVERY_FILE_DEST.
SQL> SELECT * FROM V$RECOVERY_FILE_DEST;
NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
------ ----------- ----------- ----------------- -------------
FLASH 10737418240 5368709120 256000 28
The $FLASH_RECOVERY_AREA_USAGE views shows the percentage of the total disk quota used by different types files, and how much space for each type of file can be reclaimed by deleting files that are obsolete, redundant, or already backed up to tape.
SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE 2 0 4
ONLINELOG 6 0 8
ARCHIVELOG 8.05 1.11 20
BACKUPPIECE 33.94 5.46 32
IMAGECOPY 5.64 1.23 10
FLASHBACKLOG .06 0 1
Files Stored in the Flash Recovery Area
PERMANENT Files - Multiplexed copies of Control files and online redo log files
TRANSIENT Files - Archived redo logs not yet backed up, Datafile copies, Incremental backups, Contolfile auto backups (which include spfile)
Only TRANSIENT files will be deleted from flash recovery area based up on following rules:
•Files those are obsolete under the configured RMAN retention policy.
•Transient files that are copied to tape.
•In a Data Guard environment, archived redo log files can be deleted based up on archived redo log deletion policy.
ORA-19809: limit exceeded for recovery files
Cause: The limit for recovery files specified by the DB_RECOVERY_FILE_DEST_SIZE was exceeded.
Action: The error is accompanied by 19804. See message 19804 for further details
ORA-19804: cannot reclaim nnnnn bytes disk space from mmmmm limit
Cause: Oracle cannot reclaim disk space of specified bytes from the DB_RECOVERY_FILE_DEST_SIZE limit.
Action: There are five possible solutions:
1) Take frequent backup of recovery area using RMAN.
2) Consider changing RMAN retention policy.
3) Consider changing RMAN archivelog deletion policy.
4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE.
5) Delete files from recovery area using RMAN.
ORA-38786: Flash recovery area is not enabled.
Cause: An attempt was made to perform a command that requires Flash recovery area to be enabled.
Action: Set DB_RECOVERY_FILE_DEST to an appropriate location and retry