The following script returns the contents of the stored procedures which contain the specific pattern:
SELECT OBJECT_NAME(id), [text] FROM syscomments WHERE [text] LIKE '%my pattern%' AND OBJECTPROPERTY(id, 'IsProcedure') = 1
Tags:
SQL Server