From: nzrdb6 on
Is there any way I can making the same tweak to 100 SPs without having
to script them all out into a big file and edit that file in MS Word?
Is there a more clever way to do it? Anything in SQL 2008? Any 3rd
party tools?
From: Uri Dimant on
Hi
You can script the stored procedures per object and them alter it......


"nzrdb6" <nzrdb6(a)googlemail.com> wrote in message
news:ef311cb1-8729-4a44-b01a-6412961e8427(a)b7g2000yqd.googlegroups.com...
> Is there any way I can making the same tweak to 100 SPs without having
> to script them all out into a big file and edit that file in MS Word?
> Is there a more clever way to do it? Anything in SQL 2008? Any 3rd
> party tools?


From: TheSQLGuru on
You could also use a tool such as Search and Replace from funduc.com to do
the fix if it is 'repeatable'. That tool has great regex support so you can
get arbitrarily complex in your manipulations.

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Uri Dimant" <urid(a)iscar.co.il> wrote in message
news:urjLEBguKHA.3896(a)TK2MSFTNGP02.phx.gbl...
> Hi
> You can script the stored procedures per object and them alter it......
>
>
> "nzrdb6" <nzrdb6(a)googlemail.com> wrote in message
> news:ef311cb1-8729-4a44-b01a-6412961e8427(a)b7g2000yqd.googlegroups.com...
>> Is there any way I can making the same tweak to 100 SPs without having
>> to script them all out into a big file and edit that file in MS Word?
>> Is there a more clever way to do it? Anything in SQL 2008? Any 3rd
>> party tools?
>
>


From: Erland Sommarskog on
nzrdb6 (nzrdb6(a)googlemail.com) writes:
> Is there any way I can making the same tweak to 100 SPs without having
> to script them all out into a big file and edit that file in MS Word?
> Is there a more clever way to do it? Anything in SQL 2008? Any 3rd
> party tools?

WildEdit may be the thing for you. Never tried it myself, but I use TextPad
from the same vendor: http://www.textpad.com/products/wildedit/index.html.

And while you're at it, put your procedures under version control, so you
do not need to rely on scripting in the future.

--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: Maura Jenkins on

"nzrdb6" <nzrdb6(a)googlemail.com> wrote in message
news:ef311cb1-8729-4a44-b01a-6412961e8427(a)b7g2000yqd.googlegroups.com...
> Is there any way I can making the same tweak to 100 SPs without having
> to script them all out into a big file and edit that file in MS Word?
> Is there a more clever way to do it? Anything in SQL 2008? Any 3rd
> party tools?

run this code:

SELECT type, name, definition, create_date, modify_date

FROM sys.sql_modules

JOIN sys.objects ON sys.sql_modules.object_id = sys.objects.object_id

WHERE type = 'P'

and then look at the T-SQL string functions

be careful; do SELECTS to confirm what you are changing before you use
UPDATE