Symptoms
SQL Writer Service doesn’t handle database snapshots (for example, "CREATE DATABASE DataSnapName AS SNAPSHOT") in non-component backup code path in SQL Server 2016, 2017 or 2019. You may notice the following error log entry when you run BACKUP DATABASE against the snapshots during a Volume Shadow Copy Service (VSS) backup operation.
DateTime Backup BACKUP failed to complete the command BACKUP DATABASE DataSnapName. Check the backup application log for detailed messages.
DateTime Backup Error: 3041, Severity: 16, State: 1.
DateTime Backup BACKUP failed to complete the command BACKUP DATABASE DatabaseName. Check the backup application log for detailed messages.
DateTime spid## Error: 18210, Severity: 16, State: 1.
DateTime spid## BackupVirtualDeviceFile::PrepareToFreeze: failure on backup device '{DeviceToken}1'. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application request.).
Note The errors listed earlier are generic and may occur in many scenarios. Namely the error on “DatabaseName” is only because of the abort caused by the error on DataSnapName. The current fix only addresses the situation where those errors occur when there is a SQL Server Database Snapshot on the drive selected for the VSS backup.
At the same time, the Windows Application Event log may contain an entry that resembles the following:
Error DataTime SQLWRITER 24583 None
Sqllib error: OLEDB Error encountered calling ICommandText::Execute. hr = 0x80040e14. SQLSTATE: 42000, Native Error: 3013
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: BACKUP DATABASE is terminating abnormally.
SQLSTATE: 42000, Native Error: 3002
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: Cannot BACKUP or RESTORE a database snapshot.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Resolution
This issue is fixed in the following cumulative updates for SQL Server:
About cumulative updates for SQL Server:
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
References
Learn about the terminology that Microsoft uses to describe software updates.