How to alter sp only on some servers

Puiu

Well-known member
Joined
Oct 6, 2004
Messages
90
Hello
I have an application that sometimes requires database updates. however some stored procs updates must not be run on all the servers.

Ive tried something like:

if @@servername = MyServer
begin

alter proc MyProc
.....

end

But this doesnt work. I also tried using dynamic sql but also didnt work.

Thanks
 
Back
Top