Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Display all stored procedures containing a string in SQL

Below is a simple stored procedure which can be used to display all stored procedures containing a specific string.

When execute below query it will search for all the stored procedure in the database containing the string "user"

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%user%'
AND ROUTINE_TYPE='PROCEDURE'

No Comments