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.

徵狀

假設您有一個儲存程式,可以建立 temp 資料表,並在 Microsoft SQL Server 2014 中,將記錄插入到已設定 IDENTITY_INSERT 的 表格中。 程式所建立的資料表具有身分識別欄位,且身分編制索引身分識別欄位。 當您第二次執行程式時,就會發生存取違規。 此外,您會收到下列錯誤:

Msg 0、Level 11、State 0、Line 0A 在目前命令上發生嚴重錯誤。  結果(如果有的話)應該捨棄。Msg 0,階層20,狀態0,行0A 在目前命令上發生嚴重錯誤。  結果(如果有的話)應該捨棄。

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

因應措施

若要解決此問題,請移除身分識別欄位的索引。

狀態

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!

×