select [text] from dbo.syscomments where id in (select [id] from sysobjects where type='p' and name=@name)  @name的值就是你要查询的存储过程的名称