﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / Development  / Altering SP's in Different Servers / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 10:23:51 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>Thanks a lot Jack,can you give some examples on implementing my requirement through sqlcmdor power shell</description><pubDate>Thu, 07 Jan 2010 21:47:25 GMT</pubDate><dc:creator>ningaraju.n</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>Options:1.  sqlcmd - create a batch file that uses sqlsmd to connect to each server that executes a saved sql script against each server2.  PowerShell - create a script that either has hard-coded connection information for each server or that reads the server information from a table or file and then executes a saved sql script against each connection.3.  Buy [url=http://www.quest.com/toad-for-sql-server/]Toad for SQL Server[/url] from Quest as it has multi-server query capability.</description><pubDate>Thu, 07 Jan 2010 07:22:15 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>Then what shall i do.. No options at all?:hehe:</description><pubDate>Thu, 07 Jan 2010 07:11:52 GMT</pubDate><dc:creator>ningaraju.n</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>[quote][b]ningaraju.n (1/7/2010)[/b][hr]But we are using 2005 :-)[/quote]That's why I said "IF".  MY SQL Servers are all running 2005, but I have the 2008 tools (SSMS) which allows me to use the mult-server query functionality because it is a client functionality.  That is also why I mentioned sqlcmd and PowerShell as either of those will work as well.</description><pubDate>Thu, 07 Jan 2010 06:56:55 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>But we are using 2005 :-)</description><pubDate>Thu, 07 Jan 2010 06:25:47 GMT</pubDate><dc:creator>ningaraju.n</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>If you have SSMS 2008 you can run a multi-server query, see this blog [url=http://blog.sqlauthority.com/2009/06/14/sql-server-2008-ssms-feature-multi-server-queries/]post[/url].  If not you could do a batch file or cmdexec job that uses sqlcmd to connect to each server and run the same code.  Or you could use PowerShell to run the same query against each server.  For sqlcmd and PowerShell you can save the query in a text file and load the query from there.  With PowerShell you can use a file or table to store the servers to connect to and load those up when the script starts.</description><pubDate>Thu, 07 Jan 2010 06:05:30 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>Thanks Jack,But I don't want to do it manually... So i need query which alters the SP in all different servers at once..</description><pubDate>Wed, 06 Jan 2010 21:02:41 GMT</pubDate><dc:creator>ningaraju.n</dc:creator></item><item><title>RE: Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>If you are using SSMS you need to connect to the other server and then run the statement in the context of the correct database.  First you need rights to connect to the other server, then you need rights to create/alter objects in the database.</description><pubDate>Wed, 06 Jan 2010 07:16:03 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>Altering SP's in Different Servers</title><link>http://www.sqlservercentral.com/Forums/Topic842745-145-1.aspx</link><description>Dear Friends,I have text of an stored procedure,I want to execute it in different server from my server For Eg:I have SP as ALTER PROC uspGetUserASSELECT * FROM [User]I have to run this query in vijay\sql2005 which is my friends server from my server ie; ningaraju\sql2005Is there an way to accomplish this task? If please do the need fullThanks in advance</description><pubDate>Wed, 06 Jan 2010 06:48:44 GMT</pubDate><dc:creator>ningaraju.n</dc:creator></item></channel></rss>