Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<Hello!

I wan´t to call in my stored proc, another stored proc on a remote sql-server.

like this:

<CREATE PROCEDURE [dbo].[NiceProc]
AS
BEGIN
...
exec [RemoteServer].[Datebase].myStoredProc @Date datetime, @Name nvarchar
...
END
Go

Is it possible???


Br,

Benny

What I have tried:

goggle, testing, trying an many many other thinks
Posted
Updated 20-Jun-23 18:52pm

1 solution

First of all you have to have access from one server to other. That can be solved by creating linked server[^] from your server to the one with the remote stored procedure...
After that you can call the remote stored procedure by using its full name (the four part name):
SQL
EXEC LinkedServerNamr.DatabaseName.DatabaseOwner.StoredProcedureName
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900