Search in the content of stored procedures

If you need to search in the content of all the stored procedures, here’s a quite good example to do it.


SELECT DISTINCT
       o.name AS Object_Name,
       o.type_desc
  FROM sys.sql_modules m
       INNER JOIN
       sys.objects o
         ON m.object_id = o.object_id
 WHERE m.definition Like '%Search string%';

Leave a Reply

Your email address will not be published. Required fields are marked *