OracleBackup & recovery
Fast Recovery Area usage
FRA size, used and reclaimable space, then what's using it by file type. Real used % is the number that matters: at 100% the database stops archiving and hangs.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 140 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN name HEADING "LOCATION" FORMAT A304COLUMN limit_gb HEADING "LIMIT GB" FORMAT 999,990.95COLUMN used_gb HEADING "USED GB" FORMAT 999,990.96COLUMN reclaimable_gb HEADING "RECLAIMABLE GB" FORMAT 999,990.97COLUMN real_used_pct HEADING "REAL USED %" FORMAT 990.98COLUMN files FORMAT 999,9909COLUMN file_type HEADING "FILE TYPE" FORMAT A2510COLUMN used_pct HEADING "USED %" FORMAT 990.9911COLUMN reclaim_pct HEADING "RECLAIM %" FORMAT 990.9912 13SELECT name,14 ROUND(space_limit / POWER(1024, 3), 1) AS limit_gb,15 ROUND(space_used / POWER(1024, 3), 1) AS used_gb,16 ROUND(space_reclaimable / POWER(1024, 3), 1) AS reclaimable_gb,17 ROUND(100 * (space_used - space_reclaimable) / NULLIF(space_limit, 0), 1) AS real_used_pct,18 number_of_files AS files19FROM v$recovery_file_dest;20 21SELECT file_type,22 percent_space_used AS used_pct,23 percent_space_reclaimable AS reclaim_pct,24 number_of_files AS files25FROM v$recovery_area_usage26ORDER BY percent_space_used DESC;Save it as ora-fra.sql and run it with SQL> @ora-fra.
Helps with
- ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.
- ORA-16014: log %s sequence# %s not archived, no available destinations
- ORA-19809: limit exceeded for recovery files
- ORA-19815: WARNING: db_recovery_file_dest_size of %s bytes is %s%% used, and has %s remaining bytes available.
Part of these runbooks
More Oracle scripts: Backup & recovery
- RMAN backup history with run time in hoursRun in the target database as SYSDBA, not the recovery catalog. The first report lists every RMAN job (full, incremental and archivelog) with start,…
- RMAN backup jobs in the last 7 daysStatus, duration and output size of each RMAN job, newest first.
- Running RMAN job progressPercent complete and time remaining for each RMAN channel that's working right now.
- Datafiles without a recent backupDatafiles with no backup of any kind in the last two days, or none at all. A new datafile added after the last full backup shows up here first.
- RMAN configuration (non-default settings)The persistent CONFIGURE settings stored in the control file, the same list SHOW ALL marks as changed. Check retention and control file autobackup…
- Flashback status and restore pointsWhether flashback is on, how far back you can go, and every restore point. A forgotten guaranteed restore point will keep filling the FRA until it's…