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.
Asked
Active
Viewed 1.3k times
1 Answers
10
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.

David Browne - Microsoft
- 80,331
- 6
- 39
- 67
-
I want to just open a new query windows and to have an explicit transaction started ā kalitsov May 26 '18 at 12:58
-
See above edit. Technically in IMPLICIT TRANSACTIONS a new transaction is not started until the first DML/DDL statement that requires it. ā David Browne - Microsoft May 26 '18 at 13:01
-
Thank god, i've changed the configurations a wile a go and forgot how to rollback it ā Andrey Hartung Aug 30 '20 at 20:33