SQL Server Backup failing for just 1 DB ("The system cannot find the path specified.") For the last few mornings, I have had a backup of our ReportServerTempDB fail. We are not using SSRS on this server yet, but will in the next month, so the DB is the default 8mb .mdf and 8mb .ldf (i.e. tiny).

We are using Ola Hallengren's scripts to run backups to a network location, and all the backups run perfectly until they get to the ReportServerTempDB. We mount the network location at runtime, as it is not on our domain and requires different credentials to be accessed. This is not ideal and we are looking into changing it, but for now, I need to figure this out please.

My script is as follows:

EXEC xp_cmdshell 'net use Y: \\10.1.1.200\data\SQLSANBackups /user:BackupUser Password'
GO

EXECUTE dbo.DatabaseBackup
@Databases = 'ALL_DATABASES',
@Directory = 'Y:\\',
@BackupType = 'FULL',
@ChangeBackupType = 'N',
@CleanupTime = 168,
@FileExtensionFull = 'bak',
@Compress = 'Y',
@CleanupMode = 'AFTER_BACKUP'
GO

EXEC xp_cmdshell 'net use Y: /delete'
GO


It fails with the following errors:


  BackupDiskFile::CreateMedia: Backup device 'Y:\\Servername \ReportServerTempDB\FULL\ReportServerTempDB_FULL_20190118_033124.bak' failed to create. Operating system error 3 (The system cannot find the path specified.). 
  
  Error: 18204, Severity: 16, State: 1.


As mentioned, all DBs before the ReportServerTempDB complete successfully. 
If I manually run the exact script, just specifying the ReportServerTempDB, it completes perfectly. Things were working fine earlier in the week, and there have been no network or hardware changes since.

There are 3 production databases after the backup of ReportServerTempDB. They are not getting backed up because of the failure. I don't think adding a delay will help here but will try regardless.

I am aware that ReportServerTempDB would be easy to recreate, and I will remove it if i have to, but for a tiny database, and to keep things consistent, it would be easier if I don't have to.
Ok i finally figured out the issue. It was completely random that it happened on the ReportServerTempDB, and i think that's what threw me off.
My daily maintenance runs at 3AM and includes the backups as above. I also have 30min log backups happening 24/7, also with the specified 'Y' drive and deleting it.

The Log backup was running during the normal backup, and deleting the 'Y' drive from the full backup, therefore killing the full backup as the location now no longer exists.
I have added some logic in, so that the Log backups do not remove the drive between 3AM and 6AM and that's solved the issue.
Thank you all for the assistance though.