快速查找所有存储过程中是否包含某个字符串

--将text替换成你要查找的内容 
select name 
from sysobjects o, syscomments s 
where o.id = s.id 
and text like '%text%' 
and o.xtype = 'P' 



--将text替换成你要查找的内容 
SELECT ROUTINE_NAME, ROUTINE_DEFINITION 
FROM INFORMATION_SCHEMA.ROUTINES 
WHERE ROUTINE_DEFINITION LIKE '%text%' 
AND ROUTINE_TYPE='PROCEDURE'

 

posted @ 2015-01-28 14:05  美丽的矩阵  阅读(4086)  评论(0编辑  收藏  举报