------------------------------------------
FRA :
FRA (flash or fast recovery area) is a storage area (directory on disk or ASM diskgroup) that contains
redo logs, control file, archived logs, backup pieces and copies, flashback logs and, in 11g, foreign archived logs. The flash recovery area was first introduced in Oracle 10g.
Choosing a Location for the Flash Recovery Area:
When setting up a flash recovery area, you must choose a location (a directory or Automatic Storage Management disk group) to hold the files. The flash recovery area cannot be stored on a raw file system.
Planning the Size of the Flash Recovery Area:
The larger the flash recovery area is, the more useful it becomes. Ideally, the flash recovery area should be large enough to contain all of the following files:
a) A copy of all datafiles
b) Incremental backups, as used by your chosen backup strategy
c) Online redo logs
d) Archived redo logs not yet backed up to tape
e) Control files
f) Control file autobackups (which include copies of the control file and SPFILE)
If providing this much space is impractical, it is best to create an area large enough to keep a backup
of the most important tablespaces and all the archived logs not yet copied to tape. At an absolute minimum,
the flash recovery area must be large enough to contain the archived logs that have not been copied to tape/DISK.
Setting Step for FRA:
Step-1
After you start SQL*Plus and connect to the database, set the size of the flash recovery area
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 100G SCOPE=BOTH SID='*';
Set the location of the flash recovery area. For example, if the location is the file system directory /u01/app/oracle/fast_recovery_area, then you can do the following:
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/u01/app/oracle/fast_recovery_area' SCOPE=BOTH SID='*';
If the flash recovery area location is an Automatic Storage Management disk group named FRA, for example, then you can do the following:
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '+FRA' SCOPE=BOTH SID='*';
Fast Recovery related data dictionary View:
Here given below Fast Recovery related data dictionary views
V$RECOVERY_FILE_DEST
V$FLASH_RECOVERY_AREA_USAGE
V$DBA_OUTSTANDING_ALERTS
V$FLASHBACK_DATABASE_LOGFILE
Some Query for Monitoring FRA:
-- Utilization (GB) the FRA ----
select
name,
floor(space_limit / 1024 / 1024) "Size MB",
ceil(space_used / 1024 / 1024) "Used MB"
from v$recovery_file_dest;
-------FRA Occupants------------
select * from v$flash_recovery_area_usage;
/
-- Location and size of the FRA
show parameter db_recovery_file_dest
/
-- Size, used, Reclaimable --------------
SELECT
ROUND((A.SPACE_LIMIT / 1024 / 1024 / 1024), 2) AS FLASH_IN_GB,
ROUND((A.SPACE_USED / 1024 / 1024 / 1024), 2) AS FLASH_USED_IN_GB,
ROUND((A.SPACE_RECLAIMABLE / 1024 / 1024 / 1024), 2) AS FLASH_RECLAIMABLE_GB,
SUM(B.PERCENT_SPACE_USED) AS PERCENT_OF_SPACE_USED
FROM
V$RECOVERY_FILE_DEST A,
V$FLASH_RECOVERY_AREA_USAGE B
GROUP BY
SPACE_LIMIT,
SPACE_USED ,
SPACE_RECLAIMABLE ;
------FRA Size and Space available Avaiable ------------
SELECT NAME,
SPACE_LIMIT/1024/1024/1024 AS SPACE_LIMIT_GB,
(SPACE_LIMIT - SPACE_USED + SPACE_RECLAIMABLE) /1024/1024/1024 AS SPACE_AVAILABLE_GB,
ROUND((SPACE_USED - SPACE_RECLAIMABLE)/SPACE_LIMIT * 100, 1) AS PERCENT_FULL
FROM V$RECOVERY_FILE_DEST;
/
Managing the Flash Recovery Area:
If you are facing flash_recovery_area full and resolving this error given below step:
The database issues a warning alert when reclaimable space is less than 15% and a critical alert when reclaimable space is less than 3%.
You can see the alerts in the alert.log and in DBA_OUTSTANDING_ALERTS.
SELECT object_type, message_type, message_level, reason, suggested_action
FROM dba_outstanding_alerts;
If the flash recovery area becomes full, an error is issued. Beware of using the flash recovery area for log_archive_dest_n.
If the flash recovery becomes full and Oracle cannot archive redo logs then the instance will hang.
The following actions can be done to resolve the space issue :
- Add disk space to the Flash Recovery Area or increase DB_RECOVERY_FILE_DEST_SIZE
alter system set DB_RECOVERY_FILE_DEST_SIZE=
- Use the command BACKUP RECOVERY AREA, to back up the contents of the Flash Recovery Area to a tertiary device such as tape.
RMAN> backup device type 'sbt_tape' recovery area;
or
RMAN> backup recovery area;
- Delete the files from the Flash Recovery Area using RMAN.
The removal is desribed in the RMAN documentation but this is a quick and dirty way if you don't have an rman repository - but could endanger your ability to recover - so be careful.
a) delete unwanted archive log files from disk ( rm /del )
b) connect to rman
c) rman> crosscheck archivelog all; - marks the controlfile that the archives have been deleted
d) rman> delete expired archivelog all; - deletes the log entries identified above.
- Changing RMAN retention policy.
NOTE= Manually removing fixed files from the FRA can have unexpected consequences. Oracle does not immediately detect the removal of these files, and thus the space is not reclaimed. If you end up manually removing files (or loose a disk perhaps), use the RMAN crosscheck command along with the delete command to cause Oracle to update the current control file information on the FRA. The folks at Oracle recommend that you not manually remove files managed by Oracle if at all possible.
Oracle does not delete eligible files from the Flash Recovery Area until the space must be reclaimed for some other purpose. The effect is that files recently moved to tape are often still available on disk for use in recovery. The recovery area can thus serve as a kind of cache for tape. Once the Flash Recovery Area is full, Oracle automatically deletes eligible files to reclaim space in the Flash Recovery Area as needed.
Happy configuring Oracle FRA...........