I've a SQl server 2019 on a Windows Server 2019 standard core, I manage two typer of backup, one with mantainance plans and one with Veeam Backup. The mantainance plans it's ok, the backup with Veeam fails every day with error on SQL leaving SQLServerWriter in Failed state with last error Non-retryable error. I've open a ticket on Veeam support and we have eplored vary log and the problem wasn't related to Veeam because even creating backup with vss command there are error. According to the logs, the backup job fails with the error:
[11.09.2023 00:07:12] <01> Error Failed to create snapshot: Backup job failed.
[11.09.2023 00:07:12] <01> Error Cannot create a shadow copy of the volumes containing writer's data.
[11.09.2023 00:07:12] <01> Error A VSS critical writer has failed. Writer name: [SqlServerWriter].
In the VSS writers, the error could be observed:
Writer name: 'SqlServerWriter'
Writer Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
Writer Instance Id: {1fb6de2a-c593-45c2-b592-e90ff6aad393}
State: [8] Failed
Last error: Non-retryable error
The following errors can be observed in the Windows Application events:
Log Name: Application
Source: SQLWRITER
Date: 11.09.2023 0:07:05
Event ID: 24583
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: SQL03Core
Description:
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: 3224
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: Cannot create worker thread.
Log Name: Application
Source: SQLWRITER
Date: 11.09.2023 0:07:05
Event ID: 24583
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: SQL03Core
Description:
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: 3202
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: Write on "{7F86B757-DC6E-4B76-B35D-F382797EB665}414" failed: 995(The I/O operation has been aborted because of either a thread exit or an application request.)
The server has 536 database and 8 core, so the Veeam support suppose that the problem was related to the an insufficent number of worker thread, so according to https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-max-worker-threads-server-configuration-option?view=sql-server-ver16, we have change the number of worker thread to 1000 but errors continue to raise, so Veeam support suggest to have help in order to optimize machine and thread according to the load.
Can anyone suggest a way to proced? Sorry for my bad english and thanks in advance... Stefano