ODBC/链接服务器身份验证/授权问题通过.NET运行代码中的存储过程
我有一个存储过程,该过程访问了本地SQL Server实例上设置的链接服务器。链接的服务器配置为使用预配置的ODBC DSN&司机。直接从服务器本身上直接执行SMS时,该连接正常工作。我可以查询数据并根据需要进行操作。
但是,我有一个程序要运行和自动化存储过程。我还从服务器实例运行此程序。但是,当我尝试通过代码运行存储过程时,我会收到以下消息:
链接服务器“ CareLogic”的OLE DB提供商“ MSDASQL”报告了一个错误。身份验证失败。
无法初始化链接服务器“ CareLogic” Ole DB提供商“ MSDASQL”的数据源对象。
链接服务器“ careLogic”返回消息“ [hortonworks] [thriftExtension](8)
的OLE DB提供商“ MSDASQL”
身份验证/授权错误发生。错误详细信息:状态不良:http/1.1 401未经授权”。
careLogic
是DSN/链接服务器的名称。我不确定权限折断位置。在身份验证中,身份验证在DSN本身而不是代码。
I have a stored procedure that accesses a linked server set up on the local SQL Server instance. The linked server is configured to use a preconfigured ODBC DSN & driver. The connection works fine when directly executing the sp from SMSS on the server itself. I can query data and manipulate it as I need.
However, I have a program that I want to use to run and automate the stored procedure. I'm also running this program from the server instance. However when I attempt to run the stored procedure via code, I get the following message:
The OLE DB provider "MSDASQL" for linked server "CARELOGIC" reported an error. Authentication failed.
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "CARELOGIC".
OLE DB provider "MSDASQL" for linked server "CARELOGIC" returned message "[Hortonworks][ThriftExtension] (8)
Authentication/authorization error occurred. Error details: Bad Status: HTTP/1.1 401 Unauthorized".
Carelogic
is the name of the DSN/Linked Server. I'm not sure where the permissions break is. The authentication is done w/in the DSN itself and not in code. Any ideas or help would be appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论