如何才能远程调用存储过程???(紧急阿)

grj 2002-09-01 07:11:30
有服务器A,B,我要在连着A的程序上执行B上的一个系统存储过程!


请讲明相关配置及步骤!
...全文
123 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2002-09-01
  • 打赏
  • 举报
回复
from SQL Server 2000 Books Online (look for remote stored procedures):

How to set up a remote server to allow the use of remote stored procedures (Transact-SQL)

To set up a remote server to allow the use of remote stored procedures

Run the following code on the first server running Microsoft® SQL Server™:
EXEC sp_addlinkedserver ServerName1, N'SQL Server'
EXEC sp_addlinkedserver ServerName2
EXEC sp_configure 'remote access', 1
RECONFIGURE
GO

Stop and restart the first SQL Server.


Run the following code on the second SQL Server. Make sure you are logging in using SQL Server Authentication.
-- The example shows how to set up access for a login 'sa'
-- from ServerName1 on ServerName2.
EXEC sp_addlinkedserver ServerName2, local
EXEC sp_addlinkedserver ServerName1
EXEC sp_configure 'remote access', 1
RECONFIGURE
GO
-- Assumes that the login 'sa' in ServerName2 and ServerName1
-- have the same password.
EXEC sp_addremotelogin ServerName1, sa, sa
GO

Stop and restart the second SQL Server.


Using the sa login, you can now execute a stored procedure on the second SQL Server from the first SQL Server.
grj 2002-09-01
  • 打赏
  • 举报
回复
这个过程是sp_start_job,我用它来启动B机上的同步与A机进行复制!但这个调用由A机发起我现在没配成功远程的存储过程调用!!!!!

请帮忙!!!!

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧