Error
ORA-19809: limit exceeded for recovery files ORA-19804: cannot reclaim xx bytes disk space from xx limit
What does this error mean?
This error means the Fast Recovery Area (FRA) has become full.
Oracle stores the following files in the FRA:
- Archive Logs
- Flashback Logs
- RMAN Backups
- Control File Autobackups
- Incremental Backups
When the FRA reaches its configured size (DB_RECOVERY_FILE_DEST_SIZE), Oracle cannot create new archive logs. As a result:
- Database transactions may stop
- Log switches fail
- RMAN backups fail
- Data Guard redo transport may stop
This is one of the most common production issues for Oracle DBAs.
Symptoms
You may see errors like:
ORA-19809: limit exceeded for recovery files ORA-19804: cannot reclaim 104857600 bytes disk space ORA-16038: log cannot be archived ORA-00257: Archiver error. Connect AS SYSDBA only until resolved.
Users may report:
- Application is hanging
- Database is not responding
- New transactions are failing
Step 1: Check FRA Usage
-- Size, usage, Reclaimable space used
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 ;
Example:
FLASH_IN_GB FLASH_USED_IN_GB FLASH_RECLAIMABLE_GB PERCENT_OF_SPACE_USED ----------- ---------------- -------------------- --------------------- 1024 351.01 339.91 34.28
|
|---|
Step 2: Check Archive Destination
ARCHIVE LOG LIST;
or
show parameter db_recovery_file_dest SQL> SQL> SQL> NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +RECO_FLEXSAND01 db_recovery_file_dest_size big integer 2T
Step 3: Check FRA File Usage
-- FRA Occupants SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE; SQL> SQL> SQL> FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID ----------------------- ------------------ ------------------------- --------------- ---------- CONTROL FILE 0 0 1 0 REDO LOG 0 0 0 0 ARCHIVED LOG .5 0 64 0 BACKUP PIECE .02 .02 7 0 IMAGE COPY 0 0 0 0 FLASHBACK LOG 16.62 16.58 1734 0 FOREIGN ARCHIVED LOG 0 0 0 0 AUXILIARY DATAFILE COPY 0 0 0 0 8 rows selected.
Solution 1: Increase FRA Size (Recommended)
If storage is available:
Check current value:
SHOW PARAMETER db_recovery_file_dest_size; Increase FRA: alter system set db_recovery_file_dest='+RECO_FLEXSAND01' scope=both sid='*'; alter system set db_recovery_file_dest_size=1536G scope=both sid='*'; Verify: SHOW PARAMETER db_recovery_file_dest_size; SQL> show parameter db_reco NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +RECO_FLEXSAND01 db_recovery_file_dest_size big integer 1536G SQL>
Solution 2: Delete Old Archive Logs Using RMAN
Open RMAN:
rman target /
Delete expired archives:
DELETE EXPIRED ARCHIVELOG ALL;
Delete archives older than 7 days:
DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
Delete archives already backed up once:
DELETE ARCHIVELOG ALL BACKED UP 1 TIMES TO DISK;
Solution 3: Crosscheck RMAN Repository
Sometimes RMAN thinks files exist when they have already been deleted.
CROSSCHECK ARCHIVELOG ALL; DELETE EXPIRED ARCHIVELOG ALL;
Solution 4: Remove Obsolete Backups
DELETE OBSOLETE;
This removes backups that are no longer required based on the RMAN retention policy.
Solution 5: Disable Flashback (If Not Required)
Check status:
SELECT FLASHBACK_ON FROM V$DATABASE;
Disable:
SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE FLASHBACK OFF; ALTER DATABASE OPEN;
Note: Disable Flashback only if your recovery strategy allows it.
Solution 6: Move FRA to a Larger Disk
alter system set db_recovery_file_dest='+FRA' scope=both sid='*';
Verify the Issue is Resolved
Check FRA usage again:
SELECT SPACE_LIMIT/1024/1024 AS FRA_SIZE_MB, SPACE_USED/1024/1024 AS USED_MB FROM V$RECOVERY_FILE_DEST;
Force an archive log:
ALTER SYSTEM SWITCH LOGFILE;
If the command succeeds without errors, the issue is resolved.
Preventive Actions:
- Monitor FRA usage in OEM or a monitoring tool.
- Configure alerts when FRA usage exceeds 80%.
- Schedule regular RMAN backup and archive log cleanup jobs.
- Periodically review backup retention policies.
- Ensure sufficient FRA capacity based on archive log generation.
No comments:
Post a Comment