I once needed the lines of the stored procedures to be able to trace whether I have a reference to some function, procedure or table, or sometimes to try to find something i
It stored it inside the system schema tables:
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
See MSDN about the INFORMATION_SCHEMA.ROUTINES
view:
ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/c75561b2-c9a1-48a1-9afa-a5896b6454cf.htm
For a content search on this, you can do the follwing:
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%search_string%'