Yesterday I had a requirement to remove a backup file from the RMAN catalog because we did not want recover to it. After some “research” on Google and the RMAN documentation, I found the below method:
Connect to RMAN an issue command:
list backup;
This will list all the backups cataloged in RMAN. Find the one that you want to “uncatalog”. For example, I wanted to remove the below file:
BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 27249 Full 3.75G DISK 00:00:00 28-MAR-18 BP Key: 27249 Status: AVAILABLE Compressed: NO Tag: TAG20180328 Piece Name: /backup/move/dean/PRODDBbtsuuqm6_1_1.dbc List of Datafiles in backup set 27249 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 120 Full 132807363910 29-MAR-18 +DG_ORA64/proddb/perfx_52.dbf
I then issued the below command in RMAN:
CHANGE BACKUPpiece 27249 uncatalog;
Response was
uncataloged backup piece backup piece handle=/backup/move/dean/PRODDBbtsuuqm6_1_1.dbc RECID=27249 STAMP=972007418 Uncataloged 1 objects
The file was no longer part of the subsequent RECOVER and RESTORE commands.