MSSQLSERVER_3624

适用于:SQL Server

详细信息

属性 Value
产品名称 SQL Server
事件 ID 3624
事件源 MSSQLSERVER
组件 SQLEngine
符号名称 SYS_ASSERTFAIL
消息正文 系统断定检查已失败。 有关详细信息,请查看 SQL Server 错误日志。 通常,断定失败是由软件 bug 或数据损坏导致的。 若要检查数据库是否已损坏,请考虑运行 DBCC CHECKDB。 如果您同意在安装过程中将转储发送到 Microsoft,则将向 Microsoft 发送微型转储。 更新可能来自 Microsoft 的最新 Service Pack 或来自技术支持的修补程序。

说明

断言是应用程序代码中放置的语句,以确保满足某些条件。 在这方面,断言的行为类似于错误。 你可以将断言视为突出、坚定的错误。 必须满足指定的条件,程序才能继续执行常规执行。 如果未满足条件,则会引发断言。 有关详细信息,请参阅 C/C++ 断言

SQL Server 在许多位置使用断言来确保条件为 true。 例如,条件“existingState == DB_Unencrypted”断言在运行代码中的下一个命令之前未加密数据库状态。 如果不是这种情况,则会引发断言。 错误 3624 通知你未满足此类条件,并引发了断言。

错误 3624 与 MSSQLSERVER_17066一起引发。 下面是如何在 SQL Server 错误日志中查看这些错误的示例。 你还将看到在运行时引发的断言条件,并将错误从 SQL Server 发送到客户端应用程序。

Error: 17066, Severity: 16, State: 1.
SQL Server Assertion: File: <"e:\\b\\s3\\sources\\sql\\ntdbms\\hekaton\\engine\\hadr\\physical\\ckptctrlprocesslogrecord.cpp">, line=1634 Failed Assertion = 'existingState == DB_Unencrypted'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

Error: 3624, Severity: 20, State: 1.
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.
Error: 17066, Severity: 16, State: 1.
SQL Server Assertion: File: <"xdes.cpp">, line=4919 Failed Assertion = 'lck_sufficient (lckMode, LCK_M_IX) || lck_sufficient (lckMode, LCK_M_BU)'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

Error: 3624, Severity: 20, State: 1.
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.
SQL Server Assertion: File: <diskio.cpp>, line=2902 Failed Assertion = 'filepos + cBytes <= GetMaxOffsetForIO ()'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.

Error: 3624, Severity: 20, State: 1.
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.

原因

下面是断言失败的一些可能原因:

产品 Bug
断言失败的常见原因是导致条件不真实的产品中的问题。 这些问题需要由 Microsoft 调查,在重现和理解时可以修复。

数据库损坏 导致断言失败的另一个常见原因是数据库中的物理不一致。 在内存中读取时,损坏的数据结构可能会导致预期条件为 false,从而引发断言。

外部库或筛选器驱动程序 发现断言消息的一些常见原因是由 SQL Server 内存中的外部 DLL 或旨在监视或截获 SQL Server 活动的筛选器驱动程序引起的。 如果此类外部组件修改 SQL Server 使用的对象或结构,则可能会发生断言失败。 有关详细信息,请参阅 加载某些模块或筛选器驱动程序时的性能和一致性问题。

硬件问题(内存、CPU) 故障硬件可能会导致内存中的数据结构损坏,从而导致断言故障。 此问题不太常见,但会出现此问题。

用户操作

  1. 检查 SQL Server 的版本,请参阅 确定 SQL Server 数据库引擎的版本正在运行

  2. 查找 SQL Server 版本可用的最新更新,或者最好打开 Excel 文件,该文件列出所有版本的所有修补程序

  3. 查看文章或 Excel 文件,了解在当前 SQL Server 生成后发布的任何断言修复。 如果发现后续版本修复断言问题,请考虑升级到该生成。

  4. 在某些情况下,可以在 17066 错误的失败断言部分中搜索特定的断言条件。 例如,在上面的消息搜索 lck_sufficient (lckMode, LCK_M_IX)中。 此表达式将帮助你更准确地搜索匹配问题。 此表达式是在第一个位置触发断言的条件,并且非常具体。

  5. 数据库上运行 DBCC CHECKDB 。 如果 DBCC CHECKDB 报告数据库损坏错误,请重点解决该问题,然后再解决任何其他问题。 还原干净的数据库备份并调查数据库不一致的根本原因。 有关详细信息,请参阅 排查 DBCC CHECKDB 报告的数据库一致性错误。 请记住,DBCC CHECKDB 不会检查事务日志中的损坏,如果事务日志已损坏,则无法检测到该损坏。

  6. 检查 SQL Server 内存空间中是否加载了外部模块,并检查筛选器驱动程序

    SELECT * FROM sys.dm_os_loaded_modules
    WHERE company != 'Microsoft Corporation'
    

    对于筛选器驱动程序,请从命令提示符运行以下命令

    fltmc filters
    

    加载某些模块或筛选器驱动程序时,请遵循性能和一致性问题中的建议。

  7. 如果已将 SQL Server 升级到最新的累积更新,并且 DBCC CHECKDB 未报告任何错误,请联系 Microsoft 技术支持,并准备好提供以下信息:

    • \Log 文件夹中的 SQL Server 错误日志
    • 在 \Log 文件夹中生成的 SQL Server 内存转储 (SQLDump00xx.mdmp)
    • 在可用时重现断言的步骤。 哪些查询或操作会导致引发断言?
    • 来自 fltmc filters “sys.dm_os_loaded_modules DMV”的输出
    • 有关系统的信息 - 输出来自 systeminfo