Search in Stored Procs

atomicbombatomicbomb Posts: 4
edited March 12, 2008 2:49PM in SQL Prompt code snippets
Description: Searches the contents of Stored Procs for a given phrase

Shortcut: ssp (Search Stored Procs)

Code:

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '{%}foobar{%}'

Comments

  • rjpaulsenrjpaulsen Posts: 50 New member
    This is the one I use:
    SELECT ROUTINE_NAME, ROUTINE_DEFINITION
    FROM INFORMATION_SCHEMA.ROUTINES 
    WHERE ROUTINE_DEFINITION LIKE '%$CURSOR$%' 
    AND ROUTINE_TYPE='PROCEDURE'
    ORDER BY [ROUTINE_NAME]
    
Sign In or Register to comment.