Skip to content
 

Search Stored Procedure Text

To search within stored procedures, do the following:

SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE CHARINDEX('findme', ROUTINE_DEFINITION) > 0

Or you can use sysobjects:

SELECT *
FROM sysobjects so
JOIN syscomments sm
ON sm.id = so.id
WHERE CHARINDEX('findme', sm.text) > 0
Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Related Posts:

  • » Cannot insert explicit value for identity column in table 'table' when IDENTITY_INSERT is set to OFF.
  • » Best SQL Server Pagination Method
  • » SQL Server Interview Questions
  • » Local Linked Server
  • » Reindex All Tables in a Database
    blog comments powered by Disqus