SQL Server错误:无法执行远程过程 [英] SQL Server Error: Could not execute remote procedure

查看:170
本文介绍了SQL Server错误:无法执行远程过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个SQL Server 2008框,分别称为A,B和A. C.服务器A&每个B都有到服务器C的链接服务器.链接服务器在A和A上使用完全相同的链接服务器设置. B.两者都使用完全相同的登录信息连接到C.该登录名在框C上分配了sysadmin角色.这两个配置都将RPC和RPC OUT设置为true.两者都可以毫无问题地执行SELECT,INSERT,UPDATE,DELETE. C已选中允许远程连接"和需要分布式事务".

I have three SQL Server 2008 boxes, call them A, B & C. Servers A & B each have a linked server to server C. The linked servers use the exact same linked server setup on both A & B. Both connect to C using the exact same login information. The login has the sysadmin role assigned to it on box C. Both were configured with RPC and RPC OUT set to true. Both can perform SELECT, INSERT, UPDATE, DELETE with no problems whatsoever. C has Allow remote connections and Require distributed transactions checked.

当我尝试执行存储过程时出现问题. A-> C正常运行,但是当我尝试从B运行时,出现错误:

The problem comes when I try to execute stored procedures. A->C works fine, but when I try to run from B, I get the error:

Msg 7201, Level 17, State 4, Line 1
Could not execute procedure on remote server 'C' because SQL Server is not configured for remote access. Ask your system administrator to reconfigure SQL Server to allow remote access.

我完全无法弄清楚这一点.我已经检查并重新检查了链接服务器的配置.它们在A& B.我已经进行了一次又一次的测试,并且每个都可以从A正常工作,但是B总是会给出错误.

I have been completely unable to figure this out. I have checked and rechecked the linked server configurations. They are identical on both A & B. I have run test after test and every one works fine from A, but B always gives the error.

推荐答案

执行存储过程时,它作为创建存储过程的用户(而不是执行存储过程的用户)的安全上下文运行.它被认为是安全功能.

When a stored procedure is executed, it runs as the security context of the user who created the stored procedure, not the user who is executing it. It is considered a security feature.

用于在服务器B上创建存储过程的帐户可能没有正确的权限,而用于在服务器A上创建存储过程的帐户却没有正确的权限.

It may be that the account used to create the stored procedure on server B does not have the correct rights while the account used to create the stored procedure on server A does.

使用另一个帐户在B上重新创建存储过程可以解决该问题.

Recreating the stored procedure on B with another account may solve the problem.

这篇关于SQL Server错误:无法执行远程过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆