我在 Windows Server 2019 标准核心上有一台 SQl server 2019,我管理两种类型的备份,一种带有维护计划,另一种带有 Veeam Backup。维护计划没问题,Veeam 的备份每天都会失败,并出现 SQL 错误,使 SQLServerWriter 处于失败状态,最后一个错误为不可重试错误。我已经在 Veeam 支持上开具了一张票,我们已经了解了变化日志,但问题与 Veeam 无关,因为即使使用 vss 命令创建备份也会出现错误。根据日志,备份作业失败并出现错误:
[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].
在VSS编写器中,可以观察到错误:
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
在 Windows 应用程序事件中可以观察到以下错误:
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.)
服务器有 536 个数据库和 8 个核心,因此 Veeam 支持认为问题与工作线程数量不足有关,因此根据 https://learn.microsoft.com/en-us/sql/database-engine /configure-windows/configure-the-max-worker-threads-server-configuration-option?view=sql-server-ver16,我们已将工作线程数更改为 1000,但错误继续出现,因此 Veeam 支持建议帮助根据负载优化机器和线程。
任何人都可以建议一种处理方法吗?抱歉我的英语不好,提前谢谢...斯特凡诺