Updating stored procedures | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Updating stored procedures

Hi, I have several standalone 2005 sql servers. They all have a series of stored procedures that is common to them all. Updates are made to the stored procedures every few weeks. Right now, I have to take the updated code and update every stored procedure on every box. This process is time consuming to say the least. Is there some way to automate this? I’m not sure of any way to do this. Thank you.
I’m not sure about automate, but you can script sp from developer server (I suppose) and update in the rest of the servers. Luis Martin
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
for /f %i in (servers.txt) do SQLCMD -S %i -i C:myscript.sql Mohammed U.
Thanks, but does anyone have a script that would do this? I’m pretty weak in the scripting dept.
in such cases what u generally do is SQL Scripting using SQLCMD tool. What u can do, keep all store procedure script in VSS and use SQLCMD command to apply this alter script all server. i do this to my Development/test server. Madhu