Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

徵狀

在 Microsoft SQL Server 啟動期間,您會在完成資料庫恢復並啟用用戶端連線之後,立即注意到下列一或多個問題。

症狀1

您會在 SQL Server 錯誤記錄中收到如下所示的錯誤訊息和斷言:

2014-12-13 08:03:34.85 spid24s Using 'dbghelp.dll' version '4.0.5'2014-12-13 08:03:34.85 spid24s **Dump thread - spid = 0, EC = 0x0000000082274B202014-12-13 08:03:34.85 spid24s ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008R2\MSSQL\LOG\SQLDump0001.txt2014-12-13 08:03:34.85 spid24s * *******************************************************************************2014-12-13 08:03:34.85 spid24s *2014-12-13 08:03:34.85 spid24s * BEGIN STACK DUMP:2014-12-13 08:03:34.85 spid24s * 12/13/14 08:03:34 spid 242014-12-13 08:03:34.85 spid24s *2014-12-13 08:03:34.85 spid24s * Location: ghost.cpp:17422014-12-13 08:03:34.85 spid24s * Expression: tcln1 != Null2014-12-13 08:03:34.85 spid24s * SPID: 242014-12-13 08:03:34.85 spid24s * Process ID: 354442014-12-13 08:03:34.85 spid24s *2014-12-13 08:03:35.47 spid24s Error: 17066, Severity: 16, State: 1.2014-12-13 08:03:35.47 spid24s SQL Server Assertion: File: <ghost.cpp>, line=1742 Failed Assertion = 'tcln1 != Null'. 此錯誤可能是與時間有關的。 如果在重新執行語句後發生錯誤,請使用 DBCC CHECKDB 來檢查資料庫的結構完整性,或重新開機伺服器以確保記憶體中資料結構未損毀。

症狀2

您會收到類似于 SQL Server 錯誤記錄中下列內容的錯誤訊息及例外狀況:

2014-12-13 12:38: 30.25 spid51 使用 "dbghelp" 版本 "4.0.5" 2014-12-13 12:38: 30.25 spid51 * * * 堆疊轉儲傳送至 C:\Program Files\Microsoft SQL Server \ MSSQL10_50。 SQL2008R2\MSSQL\LOG\SQLDump0003.txt2014-12-13 12:38: 30.25 spid51 SqlDumpExceptionHandler:處理51產生的致命例外狀況 c0000005 EXCEPTION_ACCESS_VIOLATION。 SQL Server is terminating this process.2014-12-13 12:38:30.25 spid51 * *******************************************************************************2014-12-13 12:38:30.25 spid51 *2014-12-13 12:38:30.25 spid51 * BEGIN STACK DUMP:2014-12-13 12:38:30.25 spid51 * 12/13/14 12:38:30 spid 512014-12-13 12:38:30.25 spid51 *2014-12-13 12:38:30.25 spid51 *2014-12-13 12:38:30.25 spid51 * Exception Address = 000000000030D47C Module(sqlservr+00000000000FD47C)2014-12-13 12:38:30.25 spid51 * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION2014-12-13 12:38:30.25 spid51 * Access Violation occurred reading address FFFFFFFFFFFFFFFF2014-12-13 12:38:30.25 spid51 * Input Buffer 54 bytes -2014-12-13 12:38:30.25 spid51 * exec usp_select12014-12-13 12:38:30.77 Server Error: 17310, Severity: 20, State: 1.2014-12-13 12:38:30.77 Server A user request from the session with SPID 51 generated a fatal exception. SQL Server 正在終止這個會話。 請與產品支援服務取得記錄目錄中產生的 dump。存取違規將會有下列呼叫堆疊: sqlservr!TaskGhostCleanup:: IsHashed + 0x8dsqlservr!TaskGhostCleanup:: [排隊 + 0x32sqlservr]!IndexRowScanner:: MoveToRowOnNextPage + 0x9csqlservr!IndexDataSetSession:: GetNextRowValuesInternal + 0x11cb

症狀3

當您收到先前症狀區段中提到的訊息之後,您會在 SQL Server 錯誤記錄中收到下列訊息:

2014-12-13 08:04: 53.37 Server Process 0:0:0 (0x23c8)工作0x000000002880C1A0 看起來不會在排程程式23上產生。 執行緒建立時間:13062953007877。 大約使用執行緒 CPU:內核 0 ms,使用者 0 ms。 進程利用率0%。 系統閒置88%。 間隔: 70013 ms. 2014-12-13 08:04: 53.37 Server Process 0:0:0 (0x71d8)工作0x000000002A8D21A0 看起來沒有在排程程式30上產生任何情況。 執行緒建立時間:13062953007891。 大約使用執行緒 CPU:內核 0 ms,使用者 0 ms。 進程利用率0%。 系統閒置88%。 Interval: 70013 ms.2014-12-13 08:04:53.38 Server ***Unable to get thread coNtext for spid 02014-12-13 08:04:53.38 Server * *******************************************************************************2014-12-13 08:04:53.38 Server *2014-12-13 08:04:53.38 Server * BEGIN STACK DUMP:2014-12-13 08:04:53.38 Server * 12/13/14 08:04:53 spid 294882014-12-13 08:04:53.38 Server *2014-12-13 08:04:53.38 Server * Non-yielding Scheduler2014-12-13 08:04:53.38 Server *2014-12-13 08:04:53.38 Server * *******************************************************************************2014-12-13 08:04:53.38 Server Stack Signature for the dump is 0x00000000000003412014-12-13 08:04:55.43 Server External dump process return code 0x20000001. 外部轉儲程式不會傳回錯誤。 2014-12-13 08:04: 55.43 Server Process 0:0:0 (0x9358)工作0x0000000081CE41A0 看起來不會在排程器4上產生。 執行緒建立時間:13062953009701。 大約使用執行緒 CPU: kernel 0 ms、user 15 ms。 進程利用率0%。 系統閒置88%。 Interval: 70011 ms。

此時 SQL Server 可能沒有回應使用者的要求。 如果是這種情況,您必須重新開機服務才能修正情況。

原因

之所以發生這個問題,是因為使用者查詢會在此程式完全初始化前,嘗試使用幻影清除佇列。

每個新的 SQL Server 累計更新都包含所有的修正程式,以及前一個累積更新中所包含的所有安全性修正程式。 查看 SQL Server 的最新累計更新:

因應措施

若要解決此問題,請遵循下列步驟:

  1. 將 T669 設定為啟動參數。 此追蹤標誌可防止使用者查詢將要求列隊給幻影清除程式。

  2. 設定 SQL Server 代理程式警示,以觸發 SQL Msg 3408 上的工作。 例如,設定下列通知:

    已完成恢復。 這只是一則資訊訊息。 不需要使用者動作。

  3. 在這個作業內,執行 TSQL 腳本以等待5到10分鐘,然後執行 DBCC TRACEOFF (669,-1) 命令。

這個程式會在 SQL Server 啟動期間,確認此追蹤旗標只有在使用中。 此追蹤標誌的使用不會影響背景幻影清除程式的一般運作。

狀態

Microsoft 已確認這是 SQL Server 的問題,目前正在調查此問題的修正程式。 這個知識庫文章會隨著提供的其他資訊更新。

參考

儲存引擎內: [幻影清除] 中的 [深度]警示SP_ADD_ALERT (Transact-sqlDBCC TRACEOFF (Transact-sql)Trace 標誌資料庫引擎啟動選項

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×