Tags

To find stored procedures that use a specific table or column even any text that you might be interested in,you can use the script below :

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 ‘%<your text>%’ and o.type=‘p’

The result will be all the stored procedures who have ‘your text’ in their definition.

Advertisements