SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Script to get an ordered list of all stored procedures with parameters

By Derek Colley,

This script is to generate a stored procedure list using the little known SP sp_sproc_columns.  The output is a table containing one row per parameter of each stored procedure, broken down by schema, proc name, parameter name and includes details on datatype and nullability.

This is designed to be useful if you're documenting your DB and/or building an offline data dictionary.


1.  Copy and paste script into a new stored procedure of your choice.

2.  Run script ad-hoc (copy/paste and F5) to generate an immediate list.

Example output:

<see screenshot> 

Total article views: 2099 | Views in the last 30 days: 2
Related Articles

Scripting Stored Procedures

Scripting Stored Procedures


Generate Drop / Create Script for views, stored Procedures

This Script generates drop and create scripts for views or stored procedures.


Change Stored Procedure Automaticly

Script describe How to change stored procedure Automaticly.


Scripting options for Stored Procedures

Scripting the IF EXISTS portion of a DROP statement for Stored Procedures


stored procedures

stored procedures

data dictionary    
stored procedure