Having a
bunch of stored procedure in a database could be a headache. Much more, is
having a thousand lines of code in each stored procedure.
The line
of SQL query statement below helps us to search all stored procedures, look into
each line of code and return a stored procedure name that finds the value you’re
looking for.
[SearchValue] is the value (in string format) you want to search. This can be any value such as file name, table name, another stored procedure name, action & the likes.
select name
from sys.procedures
where object_definition(object_id) like '%[SearchValue]%'
L.




