How To: Search a specific object or keyword within all list of stored procedures in MS SQL Server 2005
Today I came to know how to search for a specific keyword or any object like tables or columns of any tables used in a procedure. This is really useful when you have a bunch of procedures and you need to findout the procedure that have some specific tables, columns or even any keyword you wanted to search.
Here is the SQL Query that will be useful to get appropriate result set of stored procedures which contains your provided search keywords.
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%your keyword%'
Comments
Post a Comment