Applies To
All Users
Oracle Database - Enterprise Edition - Version 19.3.0.0.0 and later
Summary
++ FRA is configured and log_archive_dest_1 is set to write to FRA:
log_archive_dest_1 = "LOCATION=USE_DB_RECOVERY_FILE_DEST"
db_recovery_file_dest = "+DATA"
db_recovery_file_dest_size= 1200G
++ Retention policy is set to default i.e. REDUNDANCY 1. Also ARCHIVELOG DELETION POLICY is default i.e. NONE:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
++ Database backup is performed. Archives were NOT backed up. Still, it was noticed that FRA space reclamation automatically deleted an archive which was not backed up:
2025-02-28T13:54:20.074043-05:00
Deleted Oracle managed file +DATA/DBNAME/ARCHIVELOG/2025_02_27/thread_1_seq_3637.1228.1194173187
In above excerpt, archive sequence# 3637 was not backed up by RMAN yet it was deleted by FRA space reclamation mechanism.
Solution
++ Retention policy of redundancy 1 means that rman needs to keep only the LATEST level 0 / full backup of the database.
++ Any archive logs older then the LATEST level 0 / full backup will be marked reclaimable even if they were never backed up.
++ This is expected behavior and can be easily verified via testcase:
1. Before Backup:
Space reclaimable is 0
SQL> select * from V$RECOVERY_AREA_USAGE;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID
----------------------- ------------------ ------------------------- --------------- ----------
ARCHIVED LOG 55.75 0 65 0
x$kccagf.RECTYPE is not populated which means the archive is not reclaimable:
SQL> select DEST_ID, THREAD#, SEQUENCE#, to_char(COMPLETION_TIME, 'DD-MON-YYYY HH24:MI'), STATUS, BACKUP_COUNT, RECTYPE, FLAGS from v$archived_log al, x$kccagf dl where al.RECID = dl.RECID(+) and al.DEST_ID=1 and al.COMPLETION_TIME > SYSDATE-5;
DEST_ID THREAD# SEQUENCE# TO_CHAR(COMPLETION_TIME,'D S BACKUP_COUNT RECTYPE FLAGS
---------- ---------- ---------- -------------------------- - ------------ ---------- ----------
1 1 863 15-MAR-2025 01:19 A 0
1 1 862 13-MAR-2025 22:00 A 0
1 1 864 16-MAR-2025 06:00 A 0
2. Perform a Level 0 / Full backup:
RMAN> backup as compressed backupset database format '/u01/app/oracle/oradata/bkp/%d_%U';
3. After backup:
Old archives (older then the latest full backup) are now marked reclaimable:
SQL> select * from V$RECOVERY_AREA_USAGE;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID
----------------------- ------------------ ------------------------- --------------- ----------
ARCHIVED LOG 55.75 55.75 65 0
x$kccagf.RECTYPE = 11 i.e. reclaimable
SQL> select DEST_ID, THREAD#, SEQUENCE#, to_char(COMPLETION_TIME, 'DD-MON-YYYY HH24:MI'), STATUS, BACKUP_COUNT, RECTYPE, FLAGS from v$archived_log al, x$kccagf dl where al.RECID = dl.RECID(+) and al.DEST_ID=1 and al.COMPLETION_TIME > SYSDATE-5;
DEST_ID THREAD# SEQUENCE# TO_CHAR(COMPLETION_TIME,'D S BACKUP_COUNT RECTYPE FLAGS
---------- ---------- ---------- -------------------------- - ------------ ---------- ----------
1 1 864 16-MAR-2025 06:00 A 0 11 0
1 1 863 15-MAR-2025 01:19 A 0 11 0
1 1 862 13-MAR-2025 22:00 A 0 11 0
++ As we can see in above test, even though the archives themselves do not have backup, they are marked reclaimable because they are older then the full backup created. In case of space pressure, they will be deleted.
++ To avoid FRA from deleting any archivelog without backup, you need to set the archive deletion policy like below:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DEVICE TYPE DISK;
References
MOS document id: 3080338.1

978

被折叠的 条评论
为什么被折叠?



