Share via


MSSQLSERVER_17066

適用於:SQL Server

詳細資料

屬性
產品名稱 SQL Server
事件識別碼 17066
事件來源 MSSQLSERVER
元件 SQLEngine
符號名稱 SQLASSERT_ONLY
訊息文字 SQL Server 判斷提示:檔案: < %s > ,line=%d 失敗的判斷提示 = '%s'。 此錯誤可能與時間有關。 如果重新執行陳述式之後仍然發生此錯誤,請使用 DBCC CHECKDB 來檢查資料庫的結構完整性,或重新啟動伺服器以確定記憶體中的資料結構並未損毀。

說明

判斷提示是放置在應用程式程式碼中的語句,以確保符合特定條件。 在這方面,判斷提示的行為類似于錯誤。 你可以認為斷言是強調的,堅定的錯誤。 必須符合指定的條件,程式才能繼續定期執行。 如果不符合條件,則會引發判斷提示。 如需詳細資訊,請參閱 C/C++ 判斷提示

SQL Server 會在許多位置使用判斷提示,以確保條件成立。 例如,條件 'existingState == DB_Unencrypted' 判斷提示資料庫狀態在執行程式碼中的下一個命令之前未加密。 如果情況並非如此,則會引發判斷提示。 錯誤 3624 通知您不符合這類條件,並引發判斷提示。

錯誤 3624 會與MSSQLSERVER_3624 起引發。 以下是如何在 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 Database Engine 執行的版本和版本

  2. 尋找 SQL Server 版本 可用的最新更新,或最能開啟 列出所有組建之所有修正的 Excel 檔案

  3. 檢閱文章或 Excel 檔案,以取得在目前的 SQL Server 組建之後 發行 的任何判斷提示修正。 如果您發現稍後的組建修正判斷提示問題,請考慮升級至該組建。

  4. 在某些情況下,您可以在 17066 錯誤的失敗判斷提示部分中搜尋特定的判斷提示條件。 例如,在上述訊息中搜尋 lck_sufficient (lckMode, LCK_M_IX) 。 此運算式可協助您更準確地搜尋比對問題。 此運算式是第一次觸發判斷提示的條件,而且相當明確。

  5. 在您的資料庫上執行 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 技術支援,並準備好提供下列資訊:

    1. \Log 資料夾中的 SQL Server 錯誤記錄
    2. 在 \Log 資料夾中產生的 SQL Server 記憶體傾印 (SQLDump00xx.mdmp)
    3. 可用時重現判斷提示的步驟。 引發判斷提示的查詢或動作為何?
    4. 來自 fltmc filters 'sys.dm_os_loaded_modules DMV 的輸出。