查找存储过程中没有(NOLOCK)语句的所有对象 [英] Find all objects in stored procedure not having (NOLOCK) statement

查看:124
本文介绍了查找存储过程中没有(NOLOCK)语句的所有对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个拥有超过1000行代码的SQLSERVER 2008。



我必须找出SP中没有WITH(NOLOCK)语句的所有对象(表/视图)。是否有更简单的方法来查找所有这些对象

并添加WITH(NOLOCK)语句,最好使用SQLServer Management Studio中的通配符/正则表达式。





谢谢..

解决方案

Ra为什么不将事务隔离级别设置为READ UNCOMMITTED -



如果这种行为真的需要什么?



谢谢

Sujeet

I have an SQLSERVER 2008 having more than 1000 lines of code.

I have to find out all the objects (Tables/Views) in the SP which does not have WITH (NOLOCK) statement in it. Is there an easier way to find all such objects
and add the WITH (NOLOCK) statement preferably using wildcard/regular expression from the SQLServer Management Studio.


Thanks..

解决方案

Ra why not just set the transaction isolation level to READ UNCOMMITTED -

if that behaviour is really what''s required?

Thanks
Sujeet


这篇关于查找存储过程中没有(NOLOCK)语句的所有对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆