Ask Paula!

...bringing you notes from the field...
posts - 117 , comments - 87 , trackbacks - 0

My Links

News

Copyright © 2008-2014 Paula DiTallo

Tag Cloud

Article Categories

Archives

Post Categories

Image Galleries

.NET Development

Enterprise Integration

Entertainment - Games

Java Development

Mobile/PDA Development

Professional Affiliations

SQL Server: How Can I search for a specific text value in all the stored procedures?

To quickly look through your stored procedure objects for a text value in a database instance, do the following:

use [Metro]
go


SELECT ROUTINE_NAME
  FROM INFORMATION_SCHEMA.ROUTINES
   WHERE ROUTINE_DEFINITION LIKE '%whatyouarelookingfor%'
     AND ROUTINE_TYPE = 'PROCEDURE' 
 

Now, this is no replacement for a configuration management repository, but it will do in a pinch. BTW, remember this sql statement does NOT transcend all databases on the server, just a single db instance.

 

 

 

Print | posted on Monday, August 29, 2011 3:01 PM | Filed Under [ Practical Answers SQL ]

Feedback

Gravatar

# re: SQL Server: How Can I search for a specific text value in all the stored procedures?

Handy tip! Thanks for sharing!
8/29/2011 4:03 PM | Dave
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: