1.Why Configure The Fast Recovery Area (FRA)?
Configuring the Fast Recovery Area (FRA) should be the first step of your Database and recovery strategy. This is because FRA is the place, where Oracle Recovery Manager (RMAN) saves all the backups of the database and necessary configuration files along with metadata.
Improper configured FRA will cause error, which will lead to database backup failure. And, the backup failure is the nightmare of every DBA’s life.
2.Fast Recovery Area or Flash Recovery Area?
Actually, until Oracle 11gR1 Oracle FRA was known as Flash recovery area. But after that Oracle decided to change it from ‘flash’ to ‘fast recovery area’. Therefore, now a days its more commonly known as fast recovery area. But you can call it either fast or flash, whatever you feel comfortable with. It doesn’t really matter.
3.What is Oracle Fast Recovery Area?
FRA is nothing but a location somewhere on your disk where RMAN creates the copy of all the files of your database during backup. This location is managed by Oracle Database server.
When you run RMAN BACKUP command without specifying a backup destination, RMAN saves the backup in the Fast recovery area. But this happens only if FRA is correctly configured.
4.What does Fast Recovery Area Contain?
Fast recovery area contains all the necessary files that needs to be backed up for the smooth running of your database. You can see all these files in the FRA after you perform the first backup of your database.
Here is the list of all the contents that get saved in Fast Recovery Area by Oracle Recovery Manager (RMAN) –
- Image Copies – Exact byte-for-byte copies of all the files of the target database
- RMAN Backup Set – logical entities produced by the RMAN BACKUP command.
- Data files
- Archive Logs
- Online Redo Logs
- Flashback logs
- Control files
- Control file and spfile backup
5.Who Takes Care of Fast Recovery Area (FRA)?
Once you have configured the FRA then Oracle Server takes care of it. This is because Fast Recovery area is an Oracle Managed centralized storage location for backup and recovery files.
6.Advantages of Fast Recovery Area?
There are multiple advantages of Configuring Fast Recovery Area, such as –
- Fast Recovery Area gives you the ability to Flashback the database.
- Since FRA gives you a centralized location for all your backups thus it’s easier to manage them.
- Since all the backups are stored in a centralized location thus database server doesn’t have to waste time in finding them which makes the recovery much faster.
7.Best Location For The Fast Recovery Area?
Ideally you should be creating your Oracle FRA on a separate storage device. If your production environment has a dedicated backup server then you must consider creating this directory there.
You should never loose the contents of this directory, so make sure to place it at the safest position in your production environment. Be it on a NAS drive or on a TAPE Cartridge.
8.What if FRA is Full?
Firstly if you are aspiring to become a DBA then you must learn that the capacity planning must always be performed before backup and recovery planning.
- Delete the obsolete backups.
- Delete The Expired Backups
- Delete old FRA log files
- Archive the old logs
- Increase the FRA size – Read down below to learn how to set the FRA size
- Set the Backup Retention Policy accordingly.
9.What is the Right Size of the FRA
the fast recovery area is directly proportional to the size of the target database.
I have set the size to 2GB for the demonstration. Ideally in production environment you should set the size of your Fast recovery area 5-to-10 times larger than the size of your database.
That makes sense, for example let’s say your database holds around 2GB of data . In this case, now think – why would someone want to set the size of the directory, which is going to hold the backup of this 2GB data to 1GB or 1.5GB. That’s never going to hold the full backup of the database.
So ideally you should set the size of your FRA to at least the size of your database. But it’s still not recommended.
10.How To Check The Default Size & Location of Oracle FRA
By default both these parameters are set to nothing. Unless it was configured by OUI during the installation.
[oracle@oracle-db-19c ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 1 09:41:19 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL>
SQL> set pagesize 200
SQL> set linesize 200
SQL>
SQL>
SQL> show parameter db_recovery_file_dest;
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
SQL> show user;
USER is "SYS"
SQL>
11.How To check FRA size?
SQL>
SQL> show user;
USER is "SYS"
SQL>
SQL> select name,space_limit,space_used from v$recovery_file_dest;
no rows selected
SQL> show user;
USER is "SYS"
SQL> desc v$recovery_file_dest;
Name Null? Type
----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
NAME VARCHAR2(513)
SPACE_LIMIT NUMBER
SPACE_USED NUMBER
SPACE_RECLAIMABLE NUMBER
NUMBER_OF_FILES NUMBER
CON_ID NUMBER
SQL> select name,SPACE_LIMIT,SPACE_USED from v$recovery_file_dest;
no rows selected
SQL>
This view can give you all the information about the disk quote and the disk usage of your Oracle Fast recovery area.
The information that v$recovery_file_dest can give you is –
- Location of the FRA
- Maximum amount of disk space allocated to FRA.
- Amount of disk space used by Fast recovery area. This amount will be in
bytes
- The amount of disk space that you can reclaim.
- Number of files stored in Flash recovery area.
12.How To Disable Oracle Fast Recovery Area?
Disabling Oracle Fast Recovery Area is very simple. You just have to change the value of ‘db_recovery_file_dest’ parameter to an ’empty string’, that will reset the parameter to it’s default value. However you cannot reset ‘db_recovery_file_dest_size’ to it’s default value. However you can reduce the size to 1byte.
#Disable the fast recovery area
#Reset the db_recovery_file_dest parameter
SQL/> alter system set db_recovery_file_dest = '' SCOPE = BOTH;
#Reduce the size of db_recovery_file_dest_size parameter to 1byte
SQL/> alter system set db_recovery_file_dest_size = 1 SCOPE = BOTH;