Find Objects In The Syscomments in SQL

08/23/21

Finding Objects throughout databases can be challenging. Use this script to search the syscomments for objects.

SELECT DISTINCT a.[name]
FROM sysobjects a
INNER JOIN syscomments b on a.id = b.id
WHERE b.[text] LIKE '%[search-term]%'

We're available if you need assistance implementing custom SQL code. Contact us for help!

Share This: 

Related Resources

envelope