开发者

SQL Server 2005 Isolation level changes on service restart, how to stop it?

开发者 https://www.devze.com 2023-03-06 06:39 出处:网络
Whenever I change the isolation level from read committed to re uncommitted. The开发者_如何学Cn I restart the SQL Server Service (2005) it will reset the isolation level back to read committed.

Whenever I change the isolation level from read committed to re uncommitted. The开发者_如何学Cn I restart the SQL Server Service (2005) it will reset the isolation level back to read committed.

Is there a way to stop this from happening? (changing the value on restart of SQL Server)


Isolation level can only be set within a connection. Simply reconnecting and it will change it back to the default. An application should always explicitly set the desired isolation level if not happy with the default. The default cannot be changed.

That being said, read uncommitted is never a good isolation level, because it produces inconsistent results. Whenever an application abuses the uncommitted isolation level is an indication of an access problem (like missing indexes leading to table scans).


Isolation level is set per transaction, not per server or database.
You therefore must declare your isolation level every time you make a connection to the server.

More reading: Customizing Transaction Isolation Level.

0

精彩评论

暂无评论...
验证码 换一张
取 消