本文介紹了在 SQL Server Management Studio (SSMS) 中關閉自動提交的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我正在尋找一個選項來顯式提交/回滾在 SSMS 中執行的每個查詢,而無需顯式啟動事務.默認情況下 SSMS 自動提交,沒有回滾選項.
解決方案
您可以設置
I’m looking for an option to explicitly commit/rollback every query executed in SSMS without the need to start the transaction explicitly. By default SSMS auto commits leaving no option to rollback.
解決方案
You can SET IMPLICIT_TRANSACTIONS ON in a query window.
If you set this in the Query/Query Options
menu it will be set just for the current query. If you set this in the Tools/Options/Query Execution/SQL Server/ANSI
menu it will be the default for all new queries.
這篇關于在 SQL Server Management Studio (SSMS) 中關閉自動提交的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!