Search for Stored Procedure Containing Text
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%myField%'
AND ROUTINE_TYPE='PROCEDURE'
Just replace myField with whatever your field is called, or (to be more specific) whatever text you're trying to find in the stored procedure. I'm using this on SQL Server 2005, but judging from the query it should be fairly universal.



0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Blog Home