Probably the easiest thing to do would be to script out all the stored procedures in a database to a single file, open that with an editor, and search it with the find feature. You could also script procedures out to one file each and use Windows Explorer to search the text in the files.Also, you can search the SYSCOMMENTS table with this query. One weakness of this method is that stored procedure code can be split across multiple rows, so if the string you are searching for happens to be split across two rows, you might not find it.--Script to search for a string in stored procedure codeselect crdate, a.[OBJECT_NAME]from ( select crdate = convert(varchar(23),a.crdate,121), [OBJECT_NAME] = convert(nvarchar(300), '['+c.name+'].'+ '['+a.name+']') from SYSOBJECTS a join SYSCOMMENTS b on (a.id = b.id ) join SYSUSERS c on (a.uid = c.uid) where -- String to search for in Stored Procedures b.text like '%date%' escape '^' -- Object type P = Stored Procedures and a.type = 'p' ) agroup by crdate, a.[OBJECT_NAME]order by crdate, a.[OBJECT_NAME]
CODO ERGO SUM