Search in All Stored Procedures of a Database

Some times to search for all the Stored Procedures having a given text in its definition. Then we can query like below to get the results

SELECT OBJECT_NAME(object_id), OBJECT_DEFINITION(object_id)
FROM sys.procedures
WHERE OBJECT_DEFINITION(object_id) LIKE '%SearchWord%'

Gopikrishna

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment