查询数据库中所有包含某文本的存储过程、视图和函数的SQL

方法一:

1 select *
2  from sysobjects o, syscomments s
3  where o.id = s.id
4 and text like '%yyao%'
5 and o.xtype = 'P'

将yyao替换成自己要查找的文本 

 

方法二:

1 select routine_name,routine_definition,routine_type
2 from information_schema.routines
3 where routine_definition like '%Parent%'
4 order by routine_type

将Parent替换成自己要查找的文本 

 

方法三:

1 sp_depends customer

此方法只能查找数据库对象,如表、视图、存储过程、函数

posted on 2011-01-12 10:39  天空一角  阅读(856)  评论(0编辑  收藏  举报