Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Searching multiple stored procedures

Author  Topic 

tc101
Starting Member

4 Posts

Posted - 2008-11-10 : 16:25:51
Does SQL Server 2005 have some tool that lets you search through the stored procedures for words and phrases? If not, is there some way to dump all the stored procedures at one time into script that I can search somewhere else?

I just started on a project using SQL Server 2005. There are hundreds of stored procedures with all kinds of logic in them and no documentation.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-10 : 17:37:59
maybe this:
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
Go to Top of Page

cvraghu
Posting Yak Master

187 Posts

Posted - 2008-11-11 : 02:31:26
Since the OP has mentioned about searching SP, i would suggest to use syscomments.

Select object_name(id) from syscomments where text like '%keyword%'
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-11 : 02:52:50

or script out all procedures to text files and do search
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/13/script-out-procedures-and-functions-part-2.aspx


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

tc101
Starting Member

4 Posts

Posted - 2008-11-11 : 10:52:26
What about just right click on the DB and select tasks/generate scripts? Does the code in the previous link do it any better?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-12 : 01:33:57
quote:
Originally posted by tc101

What about just right click on the DB and select tasks/generate scripts? Does the code in the previous link do it any better?


Yes You can do that also

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -