Fandango68
Fandango68

Reputation: 4868

How to make a database auto commit all transactions

I am using SQL Server 2005 with several databases.

Recently I backed up our main production database and re-attached it as a development or test database for development purposes.

For some reason this 2nd copy of the database won't commit my SELECT statements. Every statement I run a query on the database it "locks it" and won't release back to other users, unless I force a commit statement at the end of my script.

Is there a way to SET IMPLICIT_TRANSACTIONS to OFF so that I don't have to COMMIT all the time and lock the database from other users? And again, I don't want to use that statement in the query. I want to set it in the properties of the database in some way.

I read this, but it's not much help

https://technet.microsoft.com/en-us/library/ms187807%28v=sql.90%29.aspx

Thanks

Upvotes: 0

Views: 521

Answers (1)

Ben Thul
Ben Thul

Reputation: 32697

That setting is not a database setting, but rather a client setting. Whatever client you are using to access the database is setting that option. So, technically, the answer to your question is "no", but you can change the client settings so that you have the desired effect.

Upvotes: 1

Related Questions