Alex Rivera | Logout

How do you set autocommit in an SQL Server session?

Asked 2009-07-07T03:31:47.487
71

How do you set autocommit in an SQL Server session?

Edit
Report

2 Answers

11

Autocommit is SQL Server's default transaction management mode. (SQL 2000 onwards)

Ref: Autocommit Transactions

answered 2009-07-07T03:38:44.760
2

With SQLServer 2005 Express, what I found was that even with autocommit off, insertions into a Db table were committed without my actually issuing a commit command from the Management Studio session. The only difference was, when autocommit was off, I could roll back all the insertions; with *autocommit on, I could not.* Actually, I was wrong. With autocommit mode off, I see the changes only in the QA (Query Analyzer) window from which the commands were issued. If I popped a new QA (Query Analyzer) window, I do not see the changes made by the first window (session), i.e. they are NOT committed! I had to issue explicit commit or rollback commands to make changes visible to other sessions(QA windows) -- my bad! Things are working correctly.

answered 2012-02-26T04:56:32.327

Your Answer