使用链接服务器通过存储过程传递查询失败

发布于 2024-09-30 07:26:44 字数 279 浏览 0 评论 0原文

我在 SQL Server 中创建了一个存储过程,该过程又使用链接服务器来查询两个数据库。结果在查询分析器中按预期返回,但是当我尝试在 Access 中使用传递查询运行相同的存储过程时,出现身份验证错误。

当我使用直通和任一 DSN 时,Access 查询任一数据库都没有问题,只有当我尝试执行存储过程时才会出现问题。

看起来 DSN 连接无法通过当前的 DSN 服务器将凭据传递到链接服务器。

该用户是域管理员的成员,拥有两个 SQL 服务器的完全权限,并且我在两个 DSN 上使用集成安全性。

I've created a stored procedure in SQL Server that in turn is using a linked server to query two databases. The results are returned as expected in Query Analyzer, but when I try running the same stored procedure using a pass-through query in Access I get an authentication error.

Access has no problem quering either database when I use the passthrough and either DSN, it's only when I try to execute the stored procedure.

It almost seems like the DSN connection can't pass on the credentials to the linked server via the current DSN server.

The user is a member of domain admins, has full rights to both sql servers and I'm using Integrated Security on both DSNs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧街凉风 2024-10-07 07:26:44

听起来像是一个经典的双跳问题。 配置链接服务器进行委派一文讨论了如何解决此问题。但您会注意到,列出的首要要求之一是:

  • 不得选择用户 Active Directory 属性、帐户敏感且无法委派

几乎肯定会选择域管理员帐户(或者至少,它应该位于运行良好的域中)

Sounds like a classic double hop issue. The article Configuring Linked Servers for Delegation discusses how to work around this. But you'll note that one of the first requirements listed is:

  • The user Active Directory property, Account is sensitive and cannot be delegated, must not be selected.

which is almost certainly selected for the domain admin account (or at least, it should be in a well run domain)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文