3 Replies Latest reply: Feb 20, 2013 8:45 AM by mseberg RSS

    11gR2 DB - RMAN retains backupsets outside the specified retention window

    Phil McDermott
      11.2.0.1.0 Enterprise Edition Database in Archivelog mode:
      Here's the results of SHOW ALL:

      CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 4 DAYS;
      CONFIGURE BACKUP OPTIMIZATION OFF; # default
      CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
      CONFIGURE CONTROLFILE AUTOBACKUP ON;
      CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
      CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
      CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE MAXSETSIZE TO UNLIMITED; # default
      CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
      CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
      CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
      CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE';
      CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_hcoe.f'; # default

      I run this RMAN job nightly:

      $rman_script="run {allocate channel oem_disk_backup device type disk; recover copy of database with tag 'ORA_OEM_LEVEL_0'; backup incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA_OEM_LEVEL_0' database;}
      backup device type disk tag '%TAG' archivelog all not backed up delete all input;
      allocate channel for maintenance type disk;
      delete noprompt obsolete device type disk;
      delete noprompt expired backup;
      delete noprompt expired copy;

      Here's what my FRA looks like as of 2/20/2013:

      /u05/app/oracle/recovery_area/HCOE/archivelog - 7 subdirectories dated 2013-02-14 through 2013-02-20, all empty

      /u05/app/oracle/recovery_area/HCOE/autobackup - 7 subdirectories dated 2013-02-14 through 2013-02-20. The delete noprompt obsolete seems to be deleting these according to the recovery window setting of 4 days. The 2/14 subdirectory is empty, and the 2/15 directory has only 1 file in it. The rest have 2 files.

      /u05/app/oracle/recovery_area/HCOE/backupset - 15 directories from 2013-02-06 through 2013-02-20. These are not being deleted, nor are they considered obsolete. The directories only go back until 02/06, because I manually deleted the directories and their contents before that, and did a CROSSCHECK ALL afterwards when the FRA ran out of space and the active redo could not be archived. This is what I'm confused about. Why are they not being deleted, and what do I need to do to get them to become obsolete?

      /u05/app/oracle/recovery_area/HCOE/datafile - The location of the dbf image copies which are up to date as of 3:30am 2/20/2013

      Thanks in advance.

      Phil