JTDS 驱动程序不适用于 Sql Server 2008R2,且 Denali Native SSPI 库未加载。检查 java.library.path 系统属性
我正在尝试使用 JTDS 驱动程序从我的应用程序使用 Windows 身份验证连接 Sql Server 数据库,但出现以下错误
SSO 失败:本机 SSPI 库不存在 已加载。检查java.library.path 系统属性。
以下是我尝试解决但仍然缺少某些内容的情况。
- 我已在系统目录中添加了 ntlmauth.dll,它对于 Sql Server 2005 运行良好。
- 但是我对 Sql Server 2008 R2 和 Denali 尝试了同样的操作,但它给出了我遇到了与上面提到的相同的错误
- 我也考虑了一点我的意思是我从系统目录中的 x64\SSO\ 路径复制了 ntlmauth.dll 。
我很困惑为什么这不适用于 Sql Server 2008 R2 和 Denali。
I am trying to connect Sql Server Data Base using windows authentication from my application using JTDS driver but i got following error
SSO Failed: Native SSPI library not
loaded. Check the java.library.path
system property.
Following are the scenarios where i tried to resolve but still something is missing..
- i have added ntlmauth.dll in system directory and it works fine for Sql server 2005.
- But the same thing i tried for Sql Server 2008 R2 and Denali but it gives me the same error as i mentioned above
- Also i considered bit i mean i copied ntlmauth.dll from x64\SSO\ path in system directory.
I an confused why this is not working for Sql Server 2008 R2 and Denali.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试将
ntlmauth.dll
文件放置在 Java 运行时环境的bin
文件夹中(例如C:\Program Files\Java\jre7\bin
>)。确保 DLL 的“位数”(32 位或 64 位)与 JVM 位数相匹配。
我使用 SQL Server Express 2008 R2 和此 MSDN SQL Server 论坛文章推荐了这个解决方案,它对我有用。
Try by placing the
ntlmauth.dll
file in thebin
folder of your Java Runtime Environment (e.g.C:\Program Files\Java\jre7\bin
).Be sure to match the "bitness" (32 bit or 64 bit) of the DLL with the JVM bitness.
I ran into the same issue using SQL Server Express 2008 R2 and this MSDN SQL Server Forum Article recommended this resolution, which worked for me.
除了直接将其放入 JRE 之外,您还可以仅指定 java.library.path,如下所示:
上述目录将包含 ntlmauth.dll 文件
Apart from putting it into your JRE directly, you can also just specify the
java.library.path
as such:The above directory would then contain the
ntlmauth.dll
file除了 DeChrist 的响应之外,我还必须在
C:\Program Files\Java\jdk1.8.0_91\jre\bin
的bin
文件夹中添加相同的 dll 文件。在那种情况下,它对我有用。In addition to DeChrist's response, I had to add the same dll file in the
bin
folder ofC:\Program Files\Java\jdk1.8.0_91\jre\bin
also. In that case, it worked for me.您可以通过在此位置添加 ntlmauth.dll 文件来解决您的问题
C:\Program Files\Java\jre7\bin
从这里下载文件夹
下载链接
另外,Sql 还可以从中获取一些提示,
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER02\MSSQL\Log
You can solve your problem by adding ntlmauth.dll file at this location
C:\Program Files\Java\jre7\bin
Download folder from here
Download link
Also Sql get some hints from,
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER02\MSSQL\Log