top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

SQL Server: Difference Between Implict Transaction And Explict Transaction

+6 votes
319 views
SQL Server: Difference Between Implict Transaction And Explict Transaction
posted Nov 18, 2013 by Atul Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes

When the session option IMPLICIT_TRANSACTIONS is OFF and you explicitly specify begin tran and commit/rollback then this is commonly known as an Explicit Transaction. Otherwise you get an autocommit transaction.

When IMPLICIT_TRANSACTIONS is ON an Implicit transaction is automatically started when executing one of the statement types documented in the books online article (e.g. SELECT / UPDATE / CREATE) and it must be committed or rolled back explicitly. Executing a BEGIN TRAN in this mode would increment @@TRANCOUNT and start another "nested" transaction)

you can refer this link for better understanding.

http://dba.stackexchange.com/questions/43254/is-it-a-bad-practice-to-always-create-a-transaction

answer Nov 19, 2013 by Neeraj Pandey
...