Friday, September 18, 2015

sp_help_executesproc

I have never liked the output of SSMS script to execute , so I built my own tool.

http://ydpages.com/utility/sp_help_executesproc.sql.txt


exec sp_help_executesproc 'sp_help_executesproc'

Gives you the following output:

DECLARE @procname sysname = null

,@schema sysname = null

,@verbose bit = null

,@debug int = null

SELECT @procname = @procname --sysname

,@schema = @schema --sysname

,@verbose = @verbose --bit

,@debug = @debug --int

EXECUTE [dbo].sp_help_executesproc @procname = @procname --sysname

,@schema = @schema --sysname

,@verbose = @verbose OUTPUT --bit

,@debug = @debug --int
 
 
I always build my procedures with the assumption that users will give me invalid data at every opportunity, so I always allow null to be acceptable and validate all inputs before doing any damage.

Put this one in Model to make it available over time.