问题描述
我正在尝试使用JTDS驱动程序从应用程序中使用Windows身份验证来连接Sql Server数据库,但出现以下错误
I am trying to connect Sql Server Data Base using windows authentication from my application using JTDS driver but i got following error
以下是我尝试解决但仍然缺少某些东西的情况.
Following are the scenarios where i tried to resolve but still something is missing..
- 我已在系统目录中添加了ntlmauth.dll,它对于Sql Server 2005正常工作.
- 但是我为Sql Server 2008 R2和Denali尝试过的同样的事情,但是它给了我与我上面提到的相同的错误
- 我还认为,我的意思是我从系统目录中的x64 \ SSO \路径复制了ntlmauth.dll.
我很困惑,为什么这不适用于Sql Server 2008 R2和Denali.
I an confused why this is not working for Sql Server 2008 R2 and Denali.
推荐答案
尝试将ntlmauth.dll
文件放在Java运行时环境(例如C:\Program Files\Java\jre7\bin
)的bin
文件夹中.
Try by placing the ntlmauth.dll
file in the bin
folder of your Java Runtime Environment (e.g. C:\Program Files\Java\jre7\bin
).
请确保将DLL的位数"(32位或64位)与JVM位数进行匹配.
Be sure to match the "bitness" (32 bit or 64 bit) of the DLL with the JVM bitness.
我使用SQL Server Express 2008 R2遇到了相同的问题,并且此 MSDN SQL Server论坛文章推荐了此决议,该决议对我有用.
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.
这篇关于JTDS驱动程序不适用于Sql Server 2008R2,并且Denali本机SSPI库未加载.检查java.library.path系统属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!