SQL - A VSS critical writer has failed. Writer's state: [VSS_WS_FAILED_AT_PREPARE_SNAPSHOT]

KB ID:
1915
Product:
Veeam Backup & Replication;Veeam Agent for Microsoft Windows
Version:
All
Published:
Last Modified:
2019-05-06
KB Languages:
FR

Challenge

When attempting to backup a SQL server that is hosting a significant amount of databases the following error is thrown:
 

Unable to release guest. Error: Unfreeze error: [Backup job failed. Cannot create a shadow copy of the volumes containing writer's data. A VSS critical writer has failed. Writer name: [SqlServerWriter]. Class ID: [{}]. Instance ID: [{}]. Writer's state: [VSS_WS_FAILED_AT_PREPARE_SNAPSHOT]. Error code: [0x800423f4].]
 
Error: Unfreeze error: [Backup job failed. Cannot create a shadow copy of the volumes containing writer's data. A VSS critical writer has failed. Writer name: [SqlServerWriter]. Class ID: [{}]. Instance ID: [{}]. Writer's state: [VSS_WS_FAILED_AT_PREPARE_SNAPSHOT]. Error code: [0x800423f4].]

Cause

Veeam Backup & Replication sends a VSS API request to freeze an entire SQL server including all databases. In SQL Server, the snapshot backup of each database uses five threads in the Sqlservr.exe process. Additionally, other activities may also use threads in the Sqlservr.exe process. Depending on the configuration of SQL Server, the available threads may be used up if you create a snapshot backup of many databases at the same time. 

It is possible to process the VM in a crash-consistent manner by disabling Application-Aware Image Processing within the job.

Solution

Microsoft does not recommend creating a snapshot for more than 35 databases at the same time. It is advised to create another SQL Server and move the databases that are causing failure to the other SQL server. Adding additional CPU cores and RAM may also fix the issue.
In certain scenarios changing the max worker threads Server Configuration Option may help negate the issue. However, it is advisable to contact Microsoft support for verifying this step.

For further troubleshooting, Microsoft recommends figuring out which SQL instance has the problem. Usually, the problematic SQL instance will be named in the first recorded SQLVDI error.

Please refer to the following articles for details:

More Information

Note: Veeam Support is not able to provide assistance with modifying the number of threads within SQL. Please contact Microsoft Support for assistance.

Please be aware that we’re making changes which will restrict access to product updates for users without an active contract.

OK

Rate the quality of this KB article: 
2 out of 5 based on 250 ratings

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.

Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text:

Submit