How to enable automatic transaction scoping on SQL Server Management Studio?

吃可爱长大的小学妹 提交于 2019-12-01 15:31:13

问题


I'm used to work with tools like Toad or PL/Sql Developer for Oracle and every SQL statement I run on the query window runs automatically under a trasaction scope. So, if my SQL statement is not correct, or even if I miss something on the SQL script I can rollback only by clicking on a button at the UI. If everything worked as expected, I can click on another button for commiting the current transaction. On those tools I mentioned, I don't need to write SQL statements for begin, commit or rollback a transaction. Every SQL statement has an implicit transaction associated with.

Is there a way to achieve the same functionality on SQL Server Management Studio 2008?


回答1:


You'd have to set "Implict Transactions" in tools..options..query execution

To enable COMMIT or ROLLBACK, I can only think of using the CTRL+number shortcuts



来源:https://stackoverflow.com/questions/3047676/how-to-enable-automatic-transaction-scoping-on-sql-server-management-studio

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!