What is the difference between Implicit and Explicit transaction in Sql Server 2008?
What happens in TransactionScope background? I’m using TransactionScope but in Sql server profiler I don’t see “Begin transaction…” statement.
How does it work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Basically, in c# when you set the TransactionScope to Implicit, it calls the SQL Server SET command to put the connection in IMPLICIT_TRANSACTIONS mode. Anything that you do (using one of the commands listed in the 2nd link) starts a transaction that is kept open until a commit is issued. If no commit is issued at the end of a connection, an implicit ROLLBACK is performed.
This differs from the OFF setting, which also puts every statement into a transaction – the difference is that in the OFF mode (therefore transactions are explicit), each transaction (singular statement) is immediately committed.