SQLServer 错误 17053 %ls:遇到操作系统错误 %ls。

详细信息

Attribute
产品名称 SQL Server
事件 ID 17053
事件源 MSSQLSERVER
组件 SQLEngine
符号名称 OS_ERROR
消息正文 %ls:遇到操作系统错误 %ls。

说明

出现了一般性的操作系统错误。 错误消息将更具体的操作系统包装 (操作系统) 错误,可用于帮助诊断该故障。 示例包括读取或写入失败的数据或日志文件、注册表读/写操作或其他意外 的 Win32 API 调用失败。
你经常会在SQL Server错误日志中看到此错误以及其他错误消息。 操作系统错误与其数值一起显示,后跟错误的文本消息。

用户操作

下面是你如何看到 17053 错误以及其他错误的示例。 每个示例都提供了有关如何处理特定方案的想法。

OS 错误为 665 的示例

在这种情况下,基础 OS 错误 665 表示在文件写入或读取过程中遇到文件系统限制。

Error: 17053, Severity: 16, State: 1.
K:DATAMyDB.MDF_MSSQL_DBCC11: Operating system error 665(The requested operation could not be completed due to a file system limitation) encountered.

The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x00031397ce2000 in file 'K:DATAMyDB.MDF_MSSQL_DBCC11'.

解决方法:

如果遇到这种情况,请按照本文中的步骤解决:针对SQL Server文件报告 OS 错误 665 和 1450

SQL Server错误 9001 和基础 OS 错误 1117 和 21 的示例

在这种情况下,基础 OS 错误 1117 表示磁盘设备出错或物理损坏。

Error: 17053, Severity: 16, State: 1.
SQLServerLogMgr::LogWriter: Operating system error 1117(The request could not be performed because of an I/O device error.) encountered.

Write error during log flush.

Error: 9001, Severity: 21, State: 5.
The log for database 'SQLContoso' is not available. Check the operating system error log for related error messages. Resolve any errors and restart the database.

在这种情况下,基础 OS 错误为 21,表示磁盘设备处于脱机状态,无法供操作系统和SQL Server使用。

Error: 17053, Severity: 16, State: 1.
SQLServerLogMgr::LogWriter: Operating system error 21(The device is not ready.) encountered.
Write error during log flush.

Error: 9001, Severity: 21, State: 4.
The log for database 'ContosoDB' is not available. Check the operating system error log for related error messages. Resolve any errors and restart the database.

解决方法:

如果遇到类似的情况,请解决基础 OS 错误。 在这种情况下,请与系统管理员和硬件供应商合作,确保磁盘设备处于联机状态、正常运行且未报告错误和损坏。 在这种情况下,可能需要在通过运行 DBCC CHECKDB 还原磁盘设备后检查数据库的物理完整性。 如果报告数据库损坏,请还原上一个已知良好的数据库备份。

SQL Server错误 9001 和基础 OS 错误 170 的示例

在这种情况下,基础 OS 错误 170 指示磁盘上的文件正被其他某个程序(最常见的是文件系统筛选器驱动程序)使用或锁定。

Error: 17053, Severity: 16, State: 1.
SQLServerLogMgr::LogWriter: Operating system error 170(The requested resource is in use.) encountered.

Write error during log flush.

Error: 9001, Severity: 21, State: 5.
The log for database 'SQLContoso' is not available. Check the operating system error log for related error messages. Resolve any errors and restart the database.

解决方法:

如果遇到类似的情况,请解决基础 OS 错误。 在这种情况下,请与系统管理员协作,确保数据库和日志文件不会被其他程序锁定。 在文件上长时间保留锁定的防病毒或主机保护软件、碎片整理软件或备份软件可能会导致此 OS 错误。 确保排除扫描或使用数据库文件;请参阅如何选择要在运行SQL Server的计算机上运行的防病毒软件。

在 WSFC (群集) 环境中,如果未在后端正确配置驱动器,则可能会在不需要的情况下锁定数据库文件。
有关 WSFC 存储的详细信息,请参阅故障转移群集硬件解决方案和在 Azure 虚拟机 上使用SQL Server故障转移群集实例 – 存储

SQL Server错误 9002 和基础 OS 错误 112 的示例

在这种情况下,基础 OS 错误 112 指示磁盘卷空间不足。

Error: 17053, Severity: 16, State: 1.
L:SQLLOGContoso.LDF: Operating system error 112(There is not enough space on the disk.) encountered.

Error: 9002, Severity: 17, State: 5.
The transaction log for database 'ContosoDb' is full due to 'DATABASE_MIRRORING'.

Error: 5149, Severity: 16, State: 3.
MODIFY FILE encountered operating system error 112(There is not enough space on the disk.) while attempting to expand the physical file 'L:SQLLOGContoso.LDF'.

解决方法:

如果遇到类似的情况,请解决基础 OS 112 错误。 在这种情况下,请与系统管理员协作,释放设备上的磁盘空间,然后尝试处理完整的事务日志。 有关排查错误 9002 的详细步骤,请参阅排查完整事务日志 (SQL Server错误 9002) 。

你可能感兴趣的