标题: 针对 SQL Server 文件报告 OS 错误 665 和 1450 [打印本页] 作者: 刘泽宇 时间: 2026-3-22 10:59 标题: 针对 SQL Server 文件报告 OS 错误 665 和 1450 现象
假设你在运行 SQL Server 的计算机上执行以下操作之一:
·在大型数据库上创建数据库快照。 然后,在源数据库中执行大量数据修改或维护操作。
·在镜像数据库上创建数据库快照。
·DBCC CHECKDB执行命令系列来检查大型数据库的一致性,并且还会在该数据库中执行大量数据更改。
·备份或还原数据库。
·使用并行 BCP 执行和写入到同一卷,通过 BCP 执行批量复制到多个文件。
由于这些操作,你可能会注意到 SQL Server 错误日志中报告的一个或多个这些错误,具体取决于运行 SQL Server 的环境。
输出:
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 0x00002a3ef96000 in file 'Sam.mdf:MSSQL_DBCC18'
输出:
The operating system returned error 1450 (Insufficient system resources exist to complete the requested service.) to SQL Server during a write at offset 0x00002a3ef96000 in file with handle 0x0000000000000D5C. This is usually a temporary condition and the SQL Server will keep retrying the operation. If the condition persists, then immediate action must be taken to correct it.`
除了这些错误,还可以注意到以下闩锁超时错误:
输出:
Timeout occurred while waiting for latch: class *'DBCC_MULTIOBJECT_SCANNER'*, id 000000002C61DF40, type 4, Task 0x00000000038089B8 : 16, waittime 600, flags 0x1a, owning task 0x0000000006A09828. Continuing to wait.
输出:
Timeout occurred while waiting for latch: class *'ACCESS_METHODS_HOBT_COUNT'*, id 000000002C61DF40, type 4, Task 0x00000000038089B8 : 16, waittime 600, flags 0x1a, owning task 0x0000000006A09828. Continuing to wait.
此外,在查看各种动态管理视图(DMV)时,你可能还会注意到阻止,例如 sys.dm_exec_requests 和 sys.dm_os_waiting_tasks。
在极少数情况下,你可能会发现 SQL Server 错误日志中报告的非生成计划程序问题,并且 SQL Server 会生成内存转储。