Database - Microsoft SQL Server - Stored Procedures   
   
     
   
   
   
   
     
   
Database.....Microsoft SQL Server.....Stored Procedures..... Retrieving a list of stored procedures

To list all stored procedures on a database:
SELECT * FROM sys.all_objects
WHERE ([type] = 'P' OR [type] = 'X' OR [type] = 'PC')
ORDER BY [name];

  FN    SQL Scalar Function 
  IF    Inline Table Valued Function 
  P     SQL Stored Procedure 
  PC    CLR Stored Procedure 
  TF    SQL Table Valued Function 
  V     View 
  X     Extended Stored Procedure 
List only custom stored procedures:
SELECT * FROM sys.all_objects
WHERE ([type] = 'P' OR [type] = 'X' OR [type] = 'PC')
AND is_ms_shipped = 0
ORDER BY [name];

Topic viewed 230 times.