Query to find a Stored procedure with its definition

Posted: February 9, 2009 in Sqlserver

Below query can be helpful in finding a particular stored procedure along with its definition in any database.

 

Select routine_name as Proc_Name,Specific_Schema,routine_definition as Procedure_Code from INFORMATION_SCHEMA.ROUTINES where ROUTINE_TYPE=’PROCEDURE’ order by routine_name

 

 

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s