Just replace %foobar% with any keyword and run. The MSForEachDB will cycle through every database on the instance and search every stored procedure for you.
You can change the Routine_Type to be VIEW as well and it will search all views!
Just replace %foobar% with any keyword and run. The MSForEachDB will cycle through every database on the instance and search every stored procedure for you.
You can change the Routine_Type to be VIEW as well and it will search all views!
EXEC sp_MSForEachDB
'USE ?;
SELECT DB_NAME(), ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE ''%foobar%''
AND ROUTINE_TYPE = ''PROCEDURE'''