现在的位置: 首页 > 综合 > 正文

查某个数据库中所有包含某个关键词的用户存储过程 或 用户视图

2013年01月10日 ⁄ 综合 ⁄ 共 239字 ⁄ 字号 评论关闭
use EDW_PreSource
 
select a.name,a.[type],b.[definition] 
from sys.all_objects a,sys.sql_modules b 
where a.is_ms_shipped=0 and a.object_id = b.object_id 
and a.[type] in ('P','V','AF') 
and b.[definition] like '%your keywords%' -- db fields,dbName etc
order by a.[name] asc

抱歉!评论已关闭.