Missing Incremental Backup
In my previous post, I stated that Oracle can recover back when database backup is crashed. But what to do when database backup file, either full backup or incremental is lost? When you try recover, you'll get this error:
O/S-Error: (OS 2) The system cannot find the file specified
This is simply because RMAN list the backupset as available although in reality the file is lost or had been moved to another places. You can check this by using commad list backupset;. Take a look at the ouput in Status column.
To solve this issue, simply change the status to unvailable. The command to do so is:
change backupset 32 unavailable;
Then you can recover back your database as normal.
Found new things today. It turns out you cannot use the above statement, change backupset 32 unavailable if the file is in flash recovery area. If you try to do so, the error below will be return.
ORA-19813: cannot have unavailable file xxxx in DB_RECOVERY_FILE_DEST
If you need to change the status available for backupset in RMAN catalog, you can use crosscheck command instead. For example.
crosscheck backupset 32;
This will change the backupset status from available to expired. With this, when you restore/recover, this backupset will be ignored. Take note that this will not delete the backupset both physically and logically(Does not remove the backupset from RMAN catalog).