Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set the isolation level in the connection string?

Tags:

How can I set the isolation level of all my SqlCommand ExecuteNonQuery calls to be read uncommitted? (connecting to a SQL Server 2008 enterprise instance)

I am simply transforming static data and inserting the results to my own tables on a regular basis, and would like to avoid writing more code than necessary.

like image 557
Jeff Meatball Yang Avatar asked Jul 21 '10 20:07

Jeff Meatball Yang


2 Answers

No, you cannot.

You need to explicitly define the isolation level when you start a transaction.

For more info on adjusting the isolation level, see the MSDN documentation on the topic.

like image 162
marc_s Avatar answered Sep 22 '22 14:09

marc_s


No, you cannot.

And there is No way of changing the default transaction isolation level.

http://blogs.msdn.com/b/ialonso/archive/2012/11/26/how-to-set-the-default-transaction-isolation-level-server-wide.aspx

like image 39
Madu Alikor Avatar answered Sep 21 '22 14:09

Madu Alikor