Problem description
Oracle PBS backup failing with error ORACLE31
Cause
RMAN referencing old mount points during backups which is no longer present on the PBS.
Traceback
The Oracle PBS backup Fails with the error ORACLE31. Check the RMAN logs rman_full_backup_UID_***.log for below error message.
***************************************************************************************
โ
RMAN-03002: failure of recover command at 03/07/2023 02:40:32 ORA-19870: error while restoring backup piece \\192.***.***.**\PHOENIX\******.RBK ORA-19625: error identifying file \\192.***.***.**\PHOENIX\******.RBK ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 3) The system cannot find the path specified.
**************************************************************************************
Resolution
Kindly run the below RMAN crosscheck commands on the source database and delete all the control file metadata that is being referenced from the old backups from the deleted PBS mount.
Also, run a level 0 backup.
rman target / Crosscheck copy; Crosscheck copy of archivelog all; Crosscheck archivelog all; Crosscheck backup; Delete force noprompt expired copy; Delete force noprompt expired archivelog all; Delete force noprompt expired backup; Delete force noprompt obsolete;
We have disabled and enabled the BCT in order to trigger the level-0 backup.