1

I have run into several applications that were written for a one dbms and then ported to SQL Server, and many use implicit transactions--which oftentimes really make it difficult to manage on the SQL side of things.

I came across Kendra Little's website and post here, and she seems to see the same thing:

https://sqlworkbooks.com/2018/02/when-should-i-use-explicit-transactions-for-single-statements/

  1. Implicit transactions Implicit transactions are a bit weird, and I typically only run into them when applications have been written for a different relational database and then ported to SQL Server.

My question is why? What benefit do implicit transactions provide to the application? It seems like extra work and makes things more difficult all around.

  • The benefit (if you want to call it that) is compatibility. This reduces the code changes when porting to SQL Server at the cost of technical debt. – Dan Guzman Dec 2 '19 at 3:18
  • Many applications run just fine with "atomar" database queries - where implicit transactions provide the benefit of not having to deal with them at all .. and it works just fine. In my experience there is a relatively specific range of applications that need explicit transaction handling regardless of the rdbms – eagle275 Dec 2 '19 at 6:25
  • Thank you both for the responses, and it seems like I’m not going crazy and that it is oftentimes a bit of a lazy move to use implicit transactions. – Mike S Dec 3 '19 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.