select p.name, m.definition
from sys.procedures p inner join sys.sql_modules m
on p.object_id = m.object_id
where m.definition like ‘%特定字符%’

测试的过程中在数据库里面找到一张表,还知道一个GET这张表的数据的存储过程,想找一下有没有其他操作这张表的存储过程要怎么办呢?运行上面的存储过程就可以了。例如说某张数据表的名字是“UserRankStatus”,那么就用“UserRankStatus”替换了上面的“特定字符”就好了。这个存储过程是偶然在网上找到,出处是“怡红公子”,也就是我们公司的DBA。世界真小,囧……

No related posts.

  One Response to “在SQL Server2005中查找包含特定字符的存储过程”

  1. 顶,进化越来越牛x了~~加油啊

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

   
© 2011 进化的测试 Suffusion theme by Sayontan Sinha