?
Solved

Regarding set implicit_transactions on

Posted on 2003-03-07
4
Medium Priority
?
785 Views
Last Modified: 2008-02-26
Hi,

Can anybody help me in understanding the advantages  and disadvantages
of setting the implicit_transactions on or off

thanks,
0
Comment
Question by:schinni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
nigelrivett earned 200 total points
ID: 8088267
setting it on means that a transaction will be started but not committed for each update if there isn't one already so you will have to code either

update tbl set ...
commit tran

or
begin tran
update tbl set ...
commit tran


with it off you can code either

update tbl set ....

or
begin tran
update tbl set ...
commit tran

You can use @@trancount to see if a transaction has been started but not committed.
I would recommend to leave it off.

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 8088268
There are not "advantages" or disadvantages as such. The difference is for your convenience or security.
-> Set it on mean that you need explicitely use commit to save the last statements to the database. This means you can rollback after you saw the flaw in your code (before issuing the commit)
-> Set it off means that each statement is automatically committed. this can be "dangereous" (see above)
0
 

Author Comment

by:schinni
ID: 8088337
nigelrivett,
Is there any strong reason why you recommend that
0
 

Author Comment

by:schinni
ID: 8089957
thanks very much
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question