I’ve blogged about this bug in passing, but I thought would be worthwhile to document my testcase. Basically backups of controlfiles never get marked as obsolete. The issue reproduces for both image copies and backupsets, my test-case uses the latter for simplicity.
RMAN> show all; RMAN configuration parameters for database with db_unique_name PVJTEST are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; # default 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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.2.0.1/dbhome/dbs/snapcf_PVJTEST.f'; # default RMAN> list backup of controlfile; specification does not match any backup in the repository RMAN> backup database; Starting backup at 2017-11-01 11:31:38 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00003 name=/u02/oradata/PVJTEST/sysaux01.dbf input datafile file number=00001 name=/u02/oradata/PVJTEST/system01.dbf input datafile file number=00004 name=/u02/oradata/PVJTEST/undotbs01.dbf input datafile file number=00007 name=/u02/oradata/PVJTEST/users01.dbf channel ORA_DISK_1: starting piece 1 at 2017-11-01 11:31:38 channel ORA_DISK_1: finished piece 1 at 2017-11-01 11:31:53 piece handle=/u01/app/oracle/product/12.2.0.1/dbhome/dbs/agsifi8q_1_1 tag=TAG20171101T113138 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15 Finished backup at 2017-11-01 11:31:54 Starting Control File and SPFILE Autobackup at 2017-11-01 11:31:54 piece handle=/u01/app/oracle/product/12.2.0.1/dbhome/dbs/c-2122366327-20171101-07 comment=NONE Finished Control File and SPFILE Autobackup at 2017-11-01 11:31:55 RMAN> backup database; Starting backup at 2017-11-01 11:31:59 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00003 name=/u02/oradata/PVJTEST/sysaux01.dbf input datafile file number=00001 name=/u02/oradata/PVJTEST/system01.dbf input datafile file number=00004 name=/u02/oradata/PVJTEST/undotbs01.dbf input datafile file number=00007 name=/u02/oradata/PVJTEST/users01.dbf channel ORA_DISK_1: starting piece 1 at 2017-11-01 11:31:59 channel ORA_DISK_1: finished piece 1 at 2017-11-01 11:32:14 piece handle=/u01/app/oracle/product/12.2.0.1/dbhome/dbs/aisifi9f_1_1 tag=TAG20171101T113159 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15 Finished backup at 2017-11-01 11:32:14 Starting Control File and SPFILE Autobackup at 2017-11-01 11:32:14 piece handle=/u01/app/oracle/product/12.2.0.1/dbhome/dbs/c-2122366327-20171101-08 comment=NONE Finished Control File and SPFILE Autobackup at 2017-11-01 11:32:15 RMAN> delete obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 using channel ORA_DISK_1 Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Backup Set 207 2017-11-01 11:31:53 Backup Piece 207 2017-11-01 11:31:53 /u01/app/oracle/product/12.2.0.1/dbhome/dbs/agsifi8q_1_1 Do you really want to delete the above objects (enter YES or NO)? YES deleted backup piece backup piece handle=/u01/app/oracle/product/12.2.0.1/dbhome/dbs/agsifi8q_1_1 RECID=207 STAMP=958908699 Deleted 1 objects RMAN> list backup of controlfile; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 208 Full 10.47M DISK 00:00:00 2017-11-01 11:31:54 BP Key: 208 Status: AVAILABLE Compressed: NO Tag: TAG20171101T113154 Piece Name: /u01/app/oracle/product/12.2.0.1/dbhome/dbs/c-2122366327-20171101-07 Control File Included: Ckp SCN: 12426398 Ckp time: 2017-11-01 11:31:54 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 210 Full 10.47M DISK 00:00:00 2017-11-01 11:32:14 BP Key: 210 Status: AVAILABLE Compressed: NO Tag: TAG20171101T113214 Piece Name: /u01/app/oracle/product/12.2.0.1/dbhome/dbs/c-2122366327-20171101-08 Control File Included: Ckp SCN: 12426426 Ckp time: 2017-11-01 11:32:14 RMAN>
Oracle Support initially identified the following bug:
Bug 25943271 : RMAN REPORT OBSOLETE DOES NOT REPORT CONTROLFILE BACKUP AS OBSOLETE
However after waiting for the patch, it still did not resolve the issue. Seems this may now be the following bug:
Bug 26771767 : SPFILE BACKUP OR BACKUP PIECE INCLUDES SPFILE ARE NOT REPORTED AS OBSOLETE
We are working around the issue at the moment by modifying our rman scripts to delete controlfile backups older than a certain age. Still waiting for the fix, after supplying reproducible testcase over six months ago 🙂