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 2008 R2、SQL Server 2012 或 SQL Server 2014 中有一個含有 DML 觸發程式的資料表,而且該觸發程式會將插入/刪除的資料表與其他資料表結合。 當您在這個資料表上執行 DML 語句時,可能會在觸發程式編譯期間發生存取違規,而且您會收到下列錯誤:

目前的命令發生嚴重錯誤。 結果(如果有的話)應該捨棄。

此外,在 SQL Server 錯誤記錄中還會記錄下列錯誤:

<日期><時間> spid # * * * 堆疊轉儲會傳送至 <FilePath>\SQLDumpxxx.txt<日期>< SqlDumpExceptionHandler: Process # 產生的致命例外 c0000005>。 SQL Server 正在終止這個程式。<日期><時間> spid # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *<日期><時間> Spid # *<日期><時間><1 spid # * 開始堆疊轉儲:><2 日期><時間><5 spid # * ><6 日期><><9 Spid #><0 日期><><3 Spid # *><4 日期><時間><7 Spid # *><8 日期><時間>Spid # *<日期時間 Spid # * 例外位址 = 00000000009E4F2A 模組(sqlservr + 00000000002D4F2A) 日期><時間> spid # * 例外狀況 = c0000005 EXCEPTION_ACCESS_VIOLATION<日期><時間> spid # * 在寫入位址0000000000000000時,< 日期 ><產生>spid # * 輸入緩衝區510位元組-<日期><時間> spid # * SQL_query_code

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

因應措施

若要解決此問題,請不要直接在查詢中直接使用插入/刪除的資料表,而是將它與其他資料表加入,而是將它緩存在 temp 資料表中,並在查詢中使用 temp 資料表。

狀態

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!

×