Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
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: 2075 | Views in the last 30 days: 3
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.


Scripting options for Stored Procedures

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


stored procedures

stored procedures


Stored Procedure (or) SQL Script Output to Text File

Stored Procedure (or) SQL Script Output to Text File

data dictionary    
stored procedure    

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones