How to enable automatic transaction scoping on SQL Server Management Studio?
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 someth开发者_StackOverflow社区ing 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?
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
精彩评论