Query that returns list of all Stored Procedures in an MS SQL database






4.07/5 (6 votes)
Query that returns list of all Stored Procedures
How to Get List of all Stored Procedures in an MS SQL database.
Solution 1
select * from YourDatabaseName.information_schema.routines where routine_type = 'PROCEDURE'
Solution 2
select * from YourDatabaseName.information_schema.routines where routine_type = 'PROCEDURE' and Left(Routine_Name, 3) NOT IN ('sp_', 'xp_', 'ms_')
Note: retrun Prodecdure Name Not Start from 'sp_', 'xp_', 'ms_'
Solution 3
SELECT name, type FROM dbo.sysobjects WHERE (type = 'P')
Thanks