Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force nolock hint for sql server logins

Does anyone know of a way to force a nolock hint on all transactions issued by a certain user? I'd like to provide a login for a support team to query the production system, but I want to protect it by forcing a nolock on everything they do. I'm using SQL Server 2005.

like image 968
VanOrman Avatar asked Sep 15 '08 16:09

VanOrman


1 Answers

You could configure your support staff's SQL Management Studio to set the default transaction isolation level to READ UNCOMMITTED (Tools->Options->Query Execution->SQL Server->Advanced). This is functionally the same as having NOLOCK hints on everything.

The downsides are that you'd have to do this for each member of your support team, and they'd have the ability to change the configuration on their SQL Management Studio.

like image 149
DBScissors Avatar answered Sep 23 '22 23:09

DBScissors



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!