经常获得性能低下的语句,但是text中获得聊部分关键字,不确定是包含在哪一个proc中,所以使用下面语句来搜索.
select * from syscomments b,sysobjects a where a.id=b.id and a.xtype=‘p‘ and text like ‘%....%‘ --或者 SELECT OBJECT_NAME([object_id]), * FROM sys.[sql_modules] WHERE [definition] LIKE ‘%....%‘
原文:http://www.cnblogs.com/davidhou/p/5268090.html