Find procedure or function in SQL Server 2008

If you have lots of functions or procedure and you forgot the name, you can use the following query to find by name

SELECT DISTINCT o.name ,o.xtype
FROM syscomments c
INNER JOIN sysobjects o ON c.id=o.id
WHERE c.TEXT LIKE '%SOME_TEXT%'
GO

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.