Default table lock hint on SQL Server 2005/2008

人走茶凉 提交于 2019-12-02 01:20:06

I am not aware of any such global setting. IMHO even should that exist there can be little justification for using it.

You can however set the isolation levels to control whether individual transactions are able to read changes to data made by other transactions. This is done via

SET TRANSACTION ISOLATION LEVEL
gbn

There is no global setting. The default is always READ COMMITTED

It can be changed at

NOLOCK everywhere is utterly misguided And here too:

Edit: After comment about query timeout...

A query with NOLOCK can still consume massive CPU and IO resources. Locking isn't that big an issue. If it is, then another query is taking too long, probably consuming massive CPU and IO resources...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!