Author |
Topic |
SamC
White Water Yakist
3467 Posts |
Posted - 2004-02-05 : 08:20:56
|
I've seen several threads about how to search stored proceduress for specific text. The best solutions always seem to rely on Windows "Search", which never worked for me.I ran accross [url]http://dougknox.com[/url] for unrelated reasons and noticed on the pageWINDOWS XP Fixes - the last link "Windows XP Search problems" , has a fix for "Can't find files containing text"While he offers a download to add any file extenion (like .SQL) to the text search, I followed his tip on "how to modify the registry". quote: Windows® XP has a known issue for not finding a number of File Types when you do a Search for Files "containing text" or using the "A word or phrase in the file" option. This can be remedied for many file types, but not all. The cause is the lack of a PersistentHandler value in the Registry for this type of file.You can correct this by clicking Start, Run and entering REGEDIT Navigate to HKEY_CLASSES_ROOT and locating the entry for the file type in question. For example, .txt, .adm, .asp. Expand the branch for that file type, and if the PersistentHandler subkey does not exist, create it. Do this by clicking on the file extension key and going to Edit, New, Key. Name the Key, PersistentHandler. Click on the PersistentHandler sub-key. In Regedit's right pane, double click on the Default value and enter the following (copy and paste may be your best bet): {5e941d80-bf96-11cd-b579-08002b30bfeb}If the PersistentHandler sub-key does exist, do not change the default value. This could have very undesired consequences.
Nice to be able to search Stored Proces for text.Sam |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-02-05 : 08:27:25
|
Or, drop into a command line and type :find /I "searchstring" *.sql(/I is for ignore case)Damian |
 |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2004-02-05 : 08:42:37
|
I know you're being helpful, pointing out workarounds. I'm reminded of Fred Flintstone's automobile when I think of using a command line for text searching in Win XP. What kind of car do you drive and how are the floorboards? |
 |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-02-05 : 08:56:42
|
I'm serious! Command line rocks.I have a command line open pretty much all the time now. I also have either Cygwin or a GNU Utils port, depending on which machine I'm on so I can use "grep" which is a little faster with a nicer output.I can mkdir a hell of a lot faster than it takes to right click / new folder / rename.I can "type *.sql > all.sql" to concatenate a directory of sql files for running.There are a stack of .NET tools that use command line, in fact someone just released an addin for VS.NET to have a dockable commandline inside the IDE.Also, MS are developing a new powerful command shell in Longhorn based on customer feedback.It's coming back with a vengance Sam Damian |
 |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2004-02-05 : 09:03:07
|
It's like "Night of the DOS"Graz. We need a survey: Users who would rather fight than use a command line.... |
 |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-02-05 : 09:10:50
|
hehRob and I against the world!Damian |
 |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2004-02-05 : 09:19:19
|
I was incorrect. It's actuallyNight of the living DOSI'll bet Brett, Tara and many other SQLTeam'ers are right in there with the command>dothisobscurenit -r -w -tIf I don't have a GUI I try to avoid it completely. (Isn't SQL a command line language?) I'm surprised I edited the registry to fix this problem. I usually avoid regedit like the plague (and it's a quasi-gui) |
 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-02-05 : 10:49:38
|
Oh, Sammy...What do you think QA is?Forget the GUIEver use master..xpcmdshell?How about...master..xp_cmdshell 'ECHO ''Starting sproc process 1'' > c:\sproc.log'As far as searching sprocs...I've used to script them, load to a 1 column table and the use sql...You could take it further...script every sproc in to a single file...interogate the directory where they are all stored...save it to a table variable, use dynamic sql to bcp in every file, along with it's file(sproc) name...then use sql to interogate the sprocs...MOOBrett8-) |
 |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2004-02-05 : 10:56:23
|
Sick. There's help for this problem.Ever consider the future for websites that offer psychological counseling? Skip the office visit, just go to our home page..The doctor is IN. Enter your problem here:We accept VISA, Mastercard, DiscoverThey're probably already out there. I've never looked. |
 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-02-05 : 14:17:58
|
quote: Originally posted by SamC Sick. There's help for this problem.Ever consider the future for websites that offer psychological counseling? Skip the office visit, just go to our home page..The doctor is IN. Enter your problem here:We accept VISA, Mastercard, DiscoverThey're probably already out there. I've never looked.
I'll give you sick...have funhttp://weblogs.sqlteam.com/brettk/Brett8-) |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-02-05 : 19:48:36
|
I put this link in Brett's feedback, but in case some people don't make it to the feedback section:http://vyaskn.tripod.com/code/search_stored_procedure_code.txtWith the above utility (stored procedure), you can search stored procedures, UDFs, and triggers for a given keyword.Tara |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
|
|