kenstevenson (3/14/2012)
Is there a way to quickly search some freetext in all sp/fn within the database? I often need to search for a sp but just couldn't find it, I have 300+ sp in my database.Thanks.
Yes, the following query provides a quick way to find a list of objects that contain any specific reference. So just substitute a table, column, etc. for yoursearchstring.
SELECT object_name(id) Name, text
FROM syscomments
WHERE text LIKE '%yoursearchstring%'
The table syscomments has been depreciated and was for compatibiity with SQL Server 2000. Instead of syscomments you should use sys.sql_modules.