Wednesday, February 9, 2011

How to disable Auto Commit in SQL Server

You can turn auto commit OFF by setting implicit_transactions ON:

SET IMPLICIT_TRANSACTIONS ON

When the setting is ON, it returns to implicit transaction mode. In implicit transaction mode, every change you make starts a transactions which you have to commit manually.
And when you need to enable it just run above cmd with OFF clause.

SET IMPLICIT_TRANSACTIONS OFF

autocommit is the default for Sql Server 2000 and up.

No comments: