Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: Can I searc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 11184 of 11517
Post > Topic >>

Re: Can I search for a string in a set of stored procedures?

by nidaar <nidaar@[EMAIL PROTECTED] > Jun 27, 2008 at 06:31 AM

On Jun 26, 11:08=A0am, COHENMAR...@[EMAIL PROTECTED]
 wrote:
> I found that I'm making an error in my 'case' statements, and now I
> want to go through a database full of many stored procedures to find
> that error in some of them and to fix it. =A0Is there any way to do a
> search through multiple stored procedures at once? =A0I don't see one in
> my version of Sql Server Management Studio?
> Thanks,
> Marv

Alternatively stored procedures of the database can be scripted by
right clicking on the database name and selecting Generate Scripts...
under Tasks in SSMS. This creates a .sql file with all the stored
procedures (formatted). Then Find/Replace command can be used to
search / update. Once all changes are made, executing the script can
update all stored procedures (if "Add If Not Exists..." option is not
selected during the Generate Scripts Wizard).

Also "Database Publi****ng Wizard" can be used (free downloadable from
Microsoft) to script each stored procedure to individual files. Then a
program like SQL Server Business Intelligent Development Studio can be
used to Find/Replace in files. This method can be useful if one also
wants to add the scripts to source control.

James
 




 3 Posts in Topic:
Can I search for a string in a set of stored procedures?
COHENMARVIN@[EMAIL PROTEC  2008-06-26 08:08:16 
Re: Can I search for a string in a set of stored procedures?
Ed Murphy <emurphy42@[  2008-06-26 09:26:59 
Re: Can I search for a string in a set of stored procedures?
nidaar <nidaar@[EMAIL   2008-06-27 06:31:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 22:06:13 CST 2008.