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.
Author |
Topic |
ann
Posting Yak Master
220 Posts |
Posted - 2007-02-16 : 09:45:19
|
Is there a way to search sp's? I have over 80 for one application and when we make changes, I need to update my sp - so I'd like to be able to search all sp's, say for a field name?Thanks! |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-16 : 09:50:04
|
Script out all SP to new query window and search the result.Peter LarssonHelsingborg, Sweden |
 |
|
ann
Posting Yak Master
220 Posts |
Posted - 2007-02-16 : 09:52:29
|
I'm not sure what you mean? Could you explain? Thanks |
 |
|
ann
Posting Yak Master
220 Posts |
Posted - 2007-02-16 : 09:57:56
|
ok - think I figured out a way to do this, kinda hokey, but all I can come up with: Create script of all sp - open in notepad and search for whatever field, word...etc. you want |
 |
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2007-02-16 : 10:46:53
|
You may also search syscomments table.select distinct object_name(id) from syscommentswhere text like '%searchword%'and type = 'P'the caveat is that syscomments may wrap a word around 2 rows.but there are scripts around that cater for that, look here: http://www.sqlservercentral.com/columnists/rcary/2792.asprockmoose |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-02-16 : 11:11:21
|
quote: Originally posted by ann ok - think I figured out a way to do this, kinda hokey, but all I can come up with: Create script of all sp - open in notepad and search for whatever field, word...etc. you want
That sounds much better that Peter's solution.CODO ERGO SUM |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-02-16 : 12:43:32
|
We keep all the Sprocs in individual files (which we also store in a Version Control system).We can then search the folder the Sprocs are contained in (e.g. for a specific column name), work on each sproc, save them back, and then execute them against the database - e.g. DEV first, then QA, then TEST and finally PRODUCTION.Just a thought!Kristen |
 |
|
|
|
|
|
|