SQL Serverous

SQL Serverous

Alan Wood  //  Professionally: SQL Server consultant
Personally: Geek, musician, sports fan (avid follower of Motherwell in the SPL and the 49ers and Dolphins in the NFL. Also follow the SF Giants in MLB).

Jan 13 / 7:25am

Quick tip: Search for a term in a Stored Procedure

Need to find out if a term is referenced in any stored procedures in your database?  Use the following T-SQL statement...

select name, definition
from sys.procedures p
    inner join sys.sql_modules m
        on p.object_id = m.object_id
where
    m.definition like '%search term%';

This will work in SQL Server 2005 and 2008.

Loading mentions Retweet

4 comments

Jan 20, 2009
mohammad ghoreishy said...
hi alan,
i have a problem with management studio2008
in "Object Explorer" -> "Connect" there isn't "Reporting Services". just there are :"database engine" and "sql server compact...".
i want to work with reporting service from management studio 2008.
Jan 20, 2009
Alan Wood said...
It sounds like you may only have SSMS Express installed, is that correct?
Jan 21, 2009
mohammad ghoreishy said...
hi, thanks for your reply, what other application should be installed?
Jan 21, 2009
Alan Wood said...
I'm not totally sure, but I think you may need the full version of SSMS, not Express. You should be able to get this if you have Developer Edition.

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter