Listing, finding and describing stored procedures in mssql

Note to self for future reference.

As I am re-importing all my (260) stored procedures into a new #EF6 model (long story why) – these are my favorite SQL statements today:

For listing out all the stored procedures in alphabetical order with their schema name:

SELECT [schema] = OBJECT_SCHEMA_NAME([object_id]), name FROM sys.procedures order by name;

Printing out the contents of a stored procedure (to read the return type):

EXEC sp_helptext N'[Golf80].[Tournaments].[SATLive_SetTeeTimes]’

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s