all groups > sql server (alternate) > may 2004 >
You're in the

sql server (alternate)

group:

Stored Procedure Across SQL Servers


Stored Procedure Across SQL Servers vikram404 NO[at]SPAM hotmail.com
5/21/2004 2:56:19 AM
sql server (alternate):
Hi,

Is it possible to write a Stored Procedure which can update the data
from one SQL Server to another SQL Server ? I know its possible
through DTS, but want to know if its possible using a Stored Proc by
passing the two server names as parameters to the Stored Procedures.

Thanks,
Re: Stored Procedure Across SQL Servers David Portas
5/21/2004 12:08:03 PM
You can do this easily in TSQL provided you create a linked server on the
server where you want to run the code. Then you can reference objects on
either server using fully-qualified names:

ServerName.DatabaseName.OwnerName.ObjectName

Read about Linked Servers in Books Online:
http://msdn.microsoft.com/library/en-us/adminsql/ad_1_server_4uuq.asp

--
David Portas
SQL Server MVP
--

Re: Stored Procedure Across SQL Servers MissLivvy
7/7/2004 6:22:18 AM
Yes this is possible if you set up a linked server.
[quoted text, click to view]

AddThis Social Bookmark Button