you can try running something like this:
SELECT DISTINCT o.name,o.type_desc FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id=o.object_id WHERE m.definition Like '%YourTableName%' ORDER BY 2,1
EDIT after OP mentioned SQL Server 2000
this should work on SQl Server 2000:
--remove comments to see the actual text too SELECT DISTINCT o.name --,c1.colid,c1.text FROM sysobjects o INNER JOIN syscomments c1 ON o.id = c1.id --join to next section of code in case search value is split over two rows LEFT OUTER JOIN syscomments c2 ON o.id = c2.id AND c2.colid=c1.colid+1 WHERE c1.text Like '%YourTableName%' OR RIGHT(c1.text,100)+LEFT(c2.text,100) Like '%YourTableName%' ORDER BY 1--,2
source share