Aug 9, 2010

How to get list of all stored procedures from SQL database

If you want to get list of all stored procedures from the database you are working on, just fire this query in one of the query window and all procedure names will be returned.

SELECT DISTINCT object_name(id) from sys.syscomments

You can further customize the query and filter stored procedures based on its name like the following query will return storec procedures that has 'add' in its name:

SELECT DISTINCT object_name(id) from sys.syscomments WHERE TEXT like '%add%'

No comments:

Post a Comment