I have a job scheduled to backup a production database every night at 10pm. It will run fine for a number of days and then fail with the error:
Msg 3201, Sev 16: Cannot open backup device 'PCSLogisticsDB'. Device error or device off-line. See the SQL Server error log for more details. [SQLSTATE 42000] Msg 3013, Sev 16: BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] Msg 0, Sev 0: Associated statement is not prepared [SQLSTATE HY007] The backup set is valid. [SQLSTATE 01000]
When I go back and run it manually it works fine and then will run on it's own for a few more days. I've checked and File System backups aren't running at the time the backup kicks off. Has anyone experienced this?
By using a utility from sysinternals.com called Handle, I was able to see what process had a hold on that backup file when when SQL Server was attempting to write to it. It seems our enterpise backup group was running Legato backups on our server at this time and was backing this file up.