Blog

Find procedure and function in SQL Server

By Kunal Vaishya Oct 26 2012
Find procedure and function from this query.
    • Like
    • Love It
    • Awesome
    • Interesting
    • It's Okay
    • Thumbs Down
  • 1.6k
  • 0

ROUTINE_TYPE = 'PROCEDURE' OR  'Function'

 

Select ROUTINE_TYPE,SPECIFIC_NAME,ROUTINE_DEFINITION

FROM   INFORMATION_SCHEMA.ROUTINES

WHERE  OBJECTPROPERTY(OBJECT_ID(SPECIFIC_NAME),'IsMSShipped') =0

       AND ROUTINE_DEFINITION  like '%prcleave%'

       AND ROUTINE_TYPE='PROCEDURE'