Is there a way to search for text within stored procedures? For example I want to find out if a particular table is being referenced by any stored procedure.
SELECT
OBJECT_SCHEMA_NAME(object_id) + '.' + OBJECT_NAME(object_id)
FROM
sys.sql_modules
WHERE
definition like '%whatever%'
syscomments is legacy and splits the definition into nvarchar 4000 chunks thus risking not finding what you want. The same applies to INFORMATION_SCHEMA.ROUTINES