Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Autocommit Mode

Author  Topic 

ankurgupta26
Starting Member

32 Posts

Posted - 2002-09-27 : 06:53:49

Hi,

A simple quetsion.

How can check whether the database is running in autocommit mode or not. Also is there a command to change this mode ?



Thanks !
AnkuR.

nr
SQLTeam MVY

12543 Posts

Posted - 2002-09-27 : 07:08:49

Auto commit just means that every statement is a transaction.
This is true whatever you do - you may nest transactions to stop the commit but you can't do anything about the statement being a transaction - you can only delay the commit.

You can have implicit or explicit transactions - explicit is the default mode where you pair begin trans and commits.
Implicit means that anything not run in an explicit transaction starts (and doesn't commit) a new one.

So your question is probably about implicit/explicit transactions.

You can change this for a spid by set implicit transaction on/off - in fact a lot of connection layers do it automatically (to off usually).

In 6.5 you could set the database to default to implicit transactions but I can't find it on v7.
I'll keep looking


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -