Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default ADO.NET isolation level?

I know that if I use System.Transactions.TransactionScope and don't specify an isolation level, it will default to Serializable. However, what if I'm not using transaction scope, and am just using an old-fashioned table adapter? What is the default isolation level then?

Many thanks in advance.

like image 562
Neil Barnwell Avatar asked Mar 23 '12 18:03

Neil Barnwell


1 Answers

You may not want to rely on defaults if you need to be absolute about your application data ops. These things can change between framework versions.

Highly recommend being explicit about isolation levels and session settings on all data calls - either via TransactionScope (which may mean escalation to DTC dependant on circumstances) or explicitly within the target stored proc call (if thats a route taken).

More details on DTC / TransactionScope: https://stackoverflow.com/a/9075800/1568341

TL;DR

A: Read committed for SQLS but don't assume a default

like image 104
Steve Avatar answered Nov 09 '22 13:11

Steve