• A slight correction :). Having looked at this further it seems that the INFORMATION_SCHEMA.ROUTINES view does not split the procedure definition over more than 1 row it in fact only shows the first 4000 characters of any stored proc. Which actually makes using this view for searching the procedure definitinion less than useful.

    Oh, and the INFORMATION_SCHEMA views are only in 2005 and above.

    For 2005 and above the take a look at the OBJECT_DEFINITION function, mentinoed in the following article on the same subject:

    http://databases.aspfaq.com/database/how-do-i-find-a-stored-procedure-containing-text.html