Sql Server - connect with windows authentication(Sql Server - 使用 Windows 身份验证连接)
问题描述
我必须使用 Windows 身份验证连接到 sql 服务器
sql server 在机器 192.168.3.6 上Web 服务器(客户端)在我的机器上 192.168.3.10
我正在使用 JTDS 驱动程序
dbUrl=jdbc:jtds:sqlserver://192.168.3.6:1099/db_test;instance=testConnection con = DriverManager.getConnection( dbUrl, "", "" );
我有sql server管理员用户的用户名和密码!
我还将 ntlmauth.dll
放入 c:windows
和 c:windowssystem32
中,但我总是出错:><块引用>
java.sql.SQLException: 用户 '(null)' 登录失败.理由:不是与受信任的 SQL Server 连接相关联.
有什么办法可以解决我的问题吗?非常感谢
查看 jTDS FAQ http://jtds.sourceforge.net/faq.html
你必须通过 useNTLMv2=true
和 domain=yourdomain
i must connect to a sql server with windows authentication
sql server is on machine 192.168.3.6 web server (client) is on my machine 192.168.3.10
I'm using JTDS driver
dbUrl=jdbc:jtds:sqlserver://192.168.3.6:1099/db_test;instance=test
Connection con = DriverManager.getConnection( dbUrl, "", "" );
I have username and password of administrator user of sql server !
I also put ntlmauth.dll
into c:windows
and c:windowssystem32
and I have always error:
java.sql.SQLException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Any idea to solve my problem ? Thank you very much
See jTDS FAQ http://jtds.sourceforge.net/faq.html
you will have to pass useNTLMv2=true
and domain=yourdomain
这篇关于Sql Server - 使用 Windows 身份验证连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Sql Server - 使用 Windows 身份验证连接


- 导入具有可变标题的 Excel 文件 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- SQL 临时表问题 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 更改自动增量起始编号? 2021-01-01