View Definition of Stored Procedure


  

SELECT   [object_id]
      ,[definition] 
  FROM myDatabase.[sys].[all_sql_modules] asm
  where exists(
  select * from sys.all_objects ao
where type='P'  and asm.[object_id]= ao.[object_id])
 and asm.[object_id]>0 

  
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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s