如何在 SQL Server Management Studio 上启用自动事务范围? [英] How to enable automatic transaction scoping on SQL Server Management Studio?
问题描述
我习惯于使用诸如 Toad 或 PL/Sql Developer for Oracle 和我在查询窗口上运行的每个 SQL 语句都在事务范围内自动运行.因此,如果我的 SQL 语句不正确,或者即使我遗漏了 SQL 脚本中的某些内容,我也只能通过单击 UI 上的按钮来回滚.如果一切正常,我可以单击另一个按钮来提交当前事务.在我提到的那些工具上,我不需要为开始、提交或回滚事务编写 SQL 语句.每个 SQL 语句都有一个与之关联的隐式事务.
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.
有没有办法在 SQL Server Management Studio 2008 上实现相同的功能?
Is there a way to achieve the same functionality on SQL Server Management Studio 2008?
推荐答案
您必须在 工具..选项..查询执行
要启用 COMMIT 或 ROLLBACK,我只能想到使用 CTRL+数字快捷键
To enable COMMIT or ROLLBACK, I can only think of using the CTRL+number shortcuts
这篇关于如何在 SQL Server Management Studio 上启用自动事务范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!