I have an SQLSERVER 2008 SP having more than 3000 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?
Asked
Active
Viewed 724 times
1
-
4Rather than do that, why not just set the transaction isolation level to [`READ UNCOMMITTED`](http://msdn.microsoft.com/en-us/library/ms173763.aspx) - if that behaviour is really what's required? – Damien_The_Unbeliever Aug 06 '12 at 07:31
-
Client wants NOLOCK statement specifically for each object. So iam looking for a find and replace option in SQL Server Management Studio. – papfan Aug 06 '12 at 07:38
-
1@papfan: Your client is clueless. They need educating. http://stackoverflow.com/a/2141802/27535 and the links in http://stackoverflow.com/a/3873302/27535 – gbn Aug 06 '12 at 08:35