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 中,當您嘗試使用延伸事件(xEvents)和動態管理檢視(Dmv)(例如 sys.dm_exec_requests 和 sys.dm_exec_query_stats)來監視快取的 查詢方案 時,很難將快取的查詢方案關聯在一起。

原因

發生這個問題的原因是 Query_hashQuery_plan_hash 欄的資料類型與 dmv 與 xEvents 不同。 Query_hashQuery_plan_hash資料行在 Dmv 中定義為Varbinary資料類型(sys.dm_exec_requests 和 sys.dm_exec_query_stats)。 在 xEvents 中,欄會定義為 UINT64 資料類型。

解決方案

SQL Server Service pack 資訊

此更新已在下列 SQL Server service pack 中修正:

Service pack 是累加的。 每個新的 service pack 都包含舊版 service pack 中的所有修正程式,以及任何新的修正程式。 我們建議您將最新的 service pack 和該 service pack 的最新累計更新套用。 在安裝最新的 service pack 之前,您不需要安裝舊版 service pack。 使用下列文章中的表格1,尋找最新 service pack 和最新累計更新的詳細資訊。

如何判斷 SQL Server 及其元件的版本、版本與更新層級

安裝此更新後, 會新增兩個額外的欄( 定義為 INT64 資料類型): Query_hash_signedQuery_plan_hash_signed。這可讓您更輕鬆地在 Dmv 與 xEvents 之間加入資料(例如 rpc_completedsql_batch_completed)。

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

SQL Server 2014 組建版本

最新的 SQL Server 2012 service pack

狀態

Microsoft 已確認<適用於>一節中所列的 Microsoft 產品確實有上述問題。

參考

了解 Microsoft 用來說明軟體更新的術語

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!

×