Click here to monitor SSC
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.

Usage:

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: 2088 | Views in the last 30 days: 1
 
Related Articles
FORUM

Scripting Stored Procedures

Scripting Stored Procedures

SCRIPT

Generate Drop / Create Script for views, stored Procedures

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

FORUM

Scripting options for Stored Procedures

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

FORUM

stored procedures

stored procedures

FORUM

Stored Procedure (or) SQL Script Output to Text File

Stored Procedure (or) SQL Script Output to Text File

Tags
data dictionary    
list    
parameter    
sp_sproc_columns    
stored procedure    
t-sql    
 
Contribute