Oracle Fast Recovery Area: Set DB Recovery File Dest and Size

Oracle Fast Recovery Area: Set DB Recovery File Dest and Size

The Oracle Fast Recovery Area (FRA) is a disk location where Oracle stores and manages files related to backup and recovery. Two dynamic initialization parameters β€” db_recovery_file_dest and db_recovery_file_dest_size β€” control its location and maximum size, and both can be changed without restarting the database.

The Code

1-- Set the database recovery directory and size
2-- These settings are dynamic
3
4ALTER SYSTEM SET db_recovery_file_dest='<path>' SCOPE=BOTH;
5/
6ALTER SYSTEM SET db_recovery_file_dest_size=<size> SCOPE=BOTH;
7/
1Replace `<path>` with a valid file system path, ASM disk group, or NFS mount point, and replace `<size>` with a value like `100G`, `2T`, or `500M`.

What This Code Does

These two commands configure the Oracle Fast Recovery Area at the system level while the database is running. The SCOPE=BOTH clause means the change takes effect immediately in the running instance and is saved to the server parameter file (SPFILE), so it persists across database restarts.

The FRA is the central storage location for archived redo logs, RMAN backups, flashback logs, and control file autobackups. Setting it correctly is one of the most important tasks for any Oracle DBA managing backup and recovery operations.

Breakdown of Each Statement

Statement 1 β€” Set the FRA Path

1ALTER SYSTEM SET db_recovery_file_dest='<path>' SCOPE=BOTH;
  • ALTER SYSTEM SET β€” modifies a database-wide initialization parameter dynamically
  • db_recovery_file_dest β€” defines the default directory location for all Fast Recovery Area files
  • '<path>' β€” the target directory; this must already exist on the file system before the command runs, Oracle will not create it automatically
  • SCOPE=BOTH β€” applies the change to both the live memory (SPFILE) and the running instance (MEMORY) simultaneously

Example: sql > ALTER SYSTEM SET db_recovery_file_dest='/u01/app/oracle/fra' SCOPE=BOTH; >

Statement 2 β€” Set the FRA Maximum Size

1ALTER SYSTEM SET db_recovery_file_dest_size=<size> SCOPE=BOTH;
  • db_recovery_file_dest_size β€” sets a hard limit in bytes on the total disk space Oracle can use in the FRA
  • <size> β€” accepts values in bytes (10737418240), or shorthand like 10G, 2T, 500M
  • Oracle will not write more recovery files to the FRA once this limit is reached
  • This is a Big Integer parameter type

Example: sql > ALTER SYSTEM SET db_recovery_file_dest_size=100G SCOPE=BOTH; >

Key Points

  • Order matters: You must set db_recovery_file_dest_size before you set db_recovery_file_dest. If you set the path first, Oracle raises ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE.
  • No restart needed: Both parameters are dynamic, meaning no database bounce is required for changes to take effect.
  • The path must exist: Oracle will not auto-create the directory. If the path does not exist, the command will fail with ORA-02097.
  • Hard limit enforcement: db_recovery_file_dest_size is a user-specified limit on Oracle usage β€” it does not reflect the actual free space on the underlying file system or ASM disk group.
  • RAC environments: In an Oracle RAC cluster, db_recovery_file_dest_size must be set for every instance and all instances must share the same value.
  • Verify current settings: Run SHOW PARAMETER db_recovery_file or query V$RECOVERY_FILE_DEST to check current FRA configuration.

Scope Options Explained

The SCOPE clause controls where the parameter change is applied:

SCOPE ValueEffect
MEMORYChange applies only to the running instance; lost on restart
SPFILEChange saved to SPFILE only; takes effect on next restart
BOTHChange applies immediately AND is saved permanently to SPFILE

Using SCOPE=BOTH is the standard recommended practice for FRA parameters.

Insights and Best Practices

Size the FRA generously. Oracle recommends sizing the FRA to accommodate at least one full database backup plus all archived logs generated in the backup window. A common guideline is to allocate 3x the size of the actual database when Flashback Database is enabled, because flashback logs grow roughly proportional to redo log generation.

Monitor FRA usage proactively. Query V$FLASH_RECOVERY_AREA_USAGE to see how much space each file type (archived logs, RMAN backups, flashback logs) is consuming. When the FRA approaches 100% usage, Oracle may suspend archiving or backups, causing database availability issues.

Reclaim space with RMAN when needed. If the FRA fills up, connect to RMAN and run CROSSCHECK BACKUP followed by DELETE OBSOLETE to remove expired or obsolete backups and free space. You can also run DELETE NOPROMPT COPY OF DATABASE to remove image copies.

Use ASM for enterprise deployments. In production environments, Oracle recommends pointing the FRA to an ASM disk group (e.g., +FRA) rather than a local file system, for better redundancy and I/O performance.

Verify after every change. Always confirm your settings with:

1SHOW PARAMETER db_recovery_file;
2SELECT * FROM V$RECOVERY_FILE_DEST;

Quick Reference: Common Size Formats

 1-- 10 Gigabytes
 2ALTER SYSTEM SET db_recovery_file_dest_size=10G SCOPE=BOTH;
 3
 4-- 100 Gigabytes
 5ALTER SYSTEM SET db_recovery_file_dest_size=100G SCOPE=BOTH;
 6
 7-- 2 Terabytes
 8ALTER SYSTEM SET db_recovery_file_dest_size=2T SCOPE=BOTH;
 9
10-- 14 Terabytes (large enterprise example)
11ALTER SYSTEM SET db_recovery_file_dest_size=14T SCOPE=BOTH;

Complete Working Example

 1-- Step 1: Set the FRA size FIRST (required before setting the path)
 2ALTER SYSTEM SET db_recovery_file_dest_size=100G SCOPE=BOTH;
 3/
 4
 5-- Step 2: Set the FRA directory path
 6ALTER SYSTEM SET db_recovery_file_dest='/u01/app/oracle/fra' SCOPE=BOTH;
 7/
 8
 9-- Step 3: Verify the settings
10SHOW PARAMETER db_recovery_file;
11
12-- Step 4: Confirm space allocation
13SELECT name, space_limit, space_used, space_reclaimable, number_of_files
14FROM V$RECOVERY_FILE_DEST;
15
16-- Optional: Configure archive logs to use FRA
17ALTER SYSTEM SET log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST' SCOPE=BOTH;

References

Posts in this series