添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

判斷提示是放置在應用程式程式代碼中的語句,以確保符合特定條件。 在這方面,判斷提示的行為類似於錯誤。 你可以認為斷言是強調的,堅定的錯誤。 必須符合指定的條件,程式才能繼續定期執行。 如果不符合條件,則會引發判斷提示。 如需詳細資訊,請參閱 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) 故障的硬體可能會導致記憶體中的數據結構損毀,因而導致判斷提示失敗。 此問題較不常見,但會發生此問題。

使用者動作

  • 檢查 SQL Server 的組建,請參閱判斷執行中的 SQL Server 資料庫引擎 版本和版本

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

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

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

  • 在您的資料庫上執行 DBCC CHECKDB。 如果 DBCC CHECKDB 報告資料庫損毀錯誤,請專注於解決任何其他問題。 還原乾淨的資料庫備份,並調查資料庫不一致的根本原因。 如需詳細資訊,請參閱 針對 DBCC CHECKDB 報告的資料庫一致性錯誤進行疑難解答。

  • 檢查 SQL Server 記憶體空間中是否有外部模組載入,並檢查篩選驅動程式

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

    針對篩選驅動程式,請從命令提示字元執行下列命令

    fltmc filters
    

    當載入特定模組或篩選驅動程式時,請遵循效能和一致性問題中的建議。

  • 如果您已將 SQL Server 升級至最新的累積更新,且 DBCC CHECKDB 不會回報任何錯誤,請連絡 Microsoft 技術支援,並準備好提供下列資訊:

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