Friday, November 19, 2010

Find text inside all stored procedure for selected database

You might find this hady while you want to find particular text exists with in all the procedure inside database.

SELECT DISTINCT OBJECT_NAME(id) FROM syscomments WHERE [text] LIKE '%User%'

Above query will search 'User' text inside all the stored procedure and will return distinct stored procedure names.

Hope you find it useful.

Thanks,
Ashish Chotalia

No comments:

Post a Comment