What is the default transaction isolation level for SQL Server with ADO.NET?
READ COMMITTED is the default isolation level for the Microsoft SQL Server Database Engine.
Source:
- Customizing Transaction Isolation Level @ MSDN.
Here is how it compares to other isolation levels:
- Transaction Isolation Levels @ MSDN.
The MSDN documentation for SqlConnection.BeginTransaction()
also states Read committed
... To reset the isolation level to the default (READ COMMITTED) ...
- MSDN article
The accepted answer by hkf gives the correct answer for transactions started manually with SqlConnection.BeginTransaction()
. Here, the default level is ReadCommitted.
However, this is not the only way to start a new transaction in ADO.NET: Transactions can also be created automatically by using the classes from the System.Transactions
namespace, in particular, by creating a TransactionScope
.
Contrary to transactions started manually, transactions created by the System.Transactions
infrastructure (and, thus, by a TransactionScope
) are Serializable.
See below link for more information:
- IsolationLevel Enumeration @ MSDN.