Groups | Blog | Home
all groups > sql server programming > march 2004 >

sql server programming : call SP from another server


Tom Moreau
3/25/2004 10:33:50 AM
Yes. Create a linked server to server B and then use 4-part naming:

exec SERVERB.MyDB.dbo.MyProc


--
Tom

---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql


[quoted text, click to view]
Hi,

Is it possible for server A to call store procedure that reside in server B?
I've a job in server A, where upon successful completion of it, it'll need
to run the sp in server B.

Vishal Parkar
3/25/2004 9:05:38 PM
hi kriste,

you can do this with the help of linked server. See more help on =
following system stored procedures in books online.
sp_addlinkedserver
sp_addlinkedsrvlogin

once linked server creation is successful you can execute stored =
procedure using 4 part naming convention.
Ex:
linked_server.db.owner.stored_proc

--=20
Vishal Parkar=20
kriste
3/25/2004 11:27:06 PM
Hi,

Is it possible for server A to call store procedure that reside in =
server B? I've a job in server A, where upon successful completion of =
it, it'll need to run the sp in server B.

AddThis Social Bookmark Button