SQL Server: Search Through Stored Procedures For Code
Join the DZone community and get the full member experience.Join For Free
This returns the names of stored procedures that contain the text you're looking for.
select so.name as 'storProc' from sysobjects so join syscomments sc on so.id=sc.id where so.type='P' and sc.[text] like '%BIT_YOU_WANT_TO_FIND%'Say for example you're looking for all the stored procedures that mentioned the table 'user_table' - then just use this script and the all the stored procedures that make mention of this will be returned.
Opinions expressed by DZone contributors are their own.