Another requirement of the day, we need to search text in the sql server procedures. To be more specific I want to find which procedure is using my table named as “table_name”.
So here is the quick query for that.
select distinct so.name from sys.objects so inner join syscomments sc on so.object_id = sc.id where so.type = 'p'
and sc.text like '%table_name%'.
This will list all the procedures which are using “table_name”.
Note: The query was originally created by Adil Aleem of Ln Technologies.