May 2, 2005 at 9:55 am
I need to be able to find/search for all instances of a string in all stored procedure code for a particular database. Is this possible?
May 2, 2005 at 10:04 am
Yes there is. I had the opportunity to acquire this script from sqlservercentral last year. Hope you too can benefit by it.
ALTER procedure sp_FindText @SearchText varchar(100)
AS
/*
Acknowledgement: Okie_Greg
Source: www.sqlservercentral.com/forums
Location: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=102649&p=2
Date: 21-Apr-04
*/
SELECT sysobjects.name AS 'Stored Procedure'
FROM sysobjects,syscomments
WHERE sysobjects.id = syscomments.id
AND
sysobjects.type = 'P'
AND
sysobjects.category=0
AND
charindex(@SearchText,syscomments.text)>0
RETURN
May 3, 2005 at 5:14 am
sql digger
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=112&messageid=171871
it's easy to use and highlights your search phrase
May 3, 2005 at 10:37 am
Thanks SRB and scking. You have been a great help. That SQL Digger Application is sweet!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply