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 |
|
pug2694328
Posting Yak Master
166 Posts |
Posted - 2006-11-17 : 12:31:34
|
| I need to locate all procedural TSQL code where I'm using a particular function. Is there a way to run a search through all the PROCs to find occurances of a particular litteral, rather than going into each proc and doing a find? |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-17 : 12:46:32
|
| Why not just run sp_depends functionname |
 |
|
|
pug2694328
Posting Yak Master
166 Posts |
Posted - 2006-11-17 : 12:54:58
|
| Why not indeed!That gets me there.Thanks snSQL! |
 |
|
|
pootle_flump
1064 Posts |
Posted - 2006-11-17 : 13:43:59
|
| Due to inaccuaracies highlighted here in sysdepends I tend to search the text column of syscomments now. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-11-17 : 14:37:24
|
| I search my source code repository / version control system. With a decent programmers editor that can use RegEx, folder paths, etc. etc.Kristen |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2006-11-18 : 01:59:38
|
if you don't have your db scripts under source control (you should) you can use a query similar to this (this is what pootle_flump is suggesting):http://weblogs.sqlteam.com/brettk/archive/2006/09/22/12454.aspx SqlSpec - a fast, cheap, and comprehensive data dictionary generator forSQL Server 2000/2005 and Analysis Server 2005 - http://www.elsasoft.org |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-11-18 : 12:08:28
|
| I posted this a while back:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=32319It's not vastly different from Brett's code, it's just a stored procedure version. It also suffers from the same shortcomings that are mentioned in the comments. |
 |
|
|
|
|
|