1SELECT OBJECT_NAME(object_id)
2 FROM sys.sql_modules
3 WHERE OBJECTPROPERTY(object_id, 'IsProcedure') = 1
4 AND definition LIKE '%Foo%'
1SELECT DISTINCT
2 o.name AS Object_Name,
3 o.type_desc
4 FROM sys.sql_modules m
5 INNER JOIN
6 sys.objects o
7 ON m.object_id = o.object_id
8 WHERE m.definition Like '%[ABD]%';