MSSQLSERVER_17053

适用于:SQL Server

详细信息

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

说明

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

用户操作

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

OS 错误 665 的示例

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

Error: 17053, Severity: 16, State: 1.
K:\DATA\MyDB.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:\DATA\MyDB.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,指示磁盘设备处于脱机状态,不能供 OS 和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:\SQLLOG\Contoso.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:\SQLLOG\Contoso.LDF'.

解决方法:

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