Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Tuesday, September 11, 2012

Search stored procedures by text

While working with a big database with hundreds of stored procedures, it is a pain if you don't remember the name of certain methods. So, a way to look for the method is searching  by text.

[USE DATABASE_NAME]

SELECT OBJECT_NAME(object_id)
FROM
    sys.sql_modules
WHERE
    definition LIKE '%text_to_search%'




Reference:
http://stackoverflow.com/questions/4812962/text-search-in-stored-proc-sql-server