What query can return the names of all the stored procedures in a SQL Server database
If the query could exclude system stored procedures, that would be even more helpful.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Mike stated, the best way is to use
information_schema. As long as you’re not in the master database, system stored procedures won’t be returned.If for some reason you had non-system stored procedures in the master database, you could use the query (this will filter out MOST system stored procedures):