我需要连接的数据库是windows 身份验证,而不是SQL Server 身份验证。
eclipse中数据库属性配置
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://localhost:1433;database=inventory;integratedSecurity=True
jdbc.username=go\Memo
jdbc.password=
注意:因为windows验证没有密码,所以密码可以空着,integratedSecurity一定要为true,默认integratedSecurity为fasle 意思是禁止用windows身份验证。
接下来可能会遇到这样的问题:

本文介绍了如何在Eclipse中配置数据库连接,以使用Windows身份验证连接到SQL Server 2012。关键配置包括设置`jdbc.url`参数为`integratedSecurity=True`,并确保在系统路径中包含sqljdbc_auth.dll文件以解决集成身份验证的问题。如果遇到‘没有为集成身份验证配置驱动程序’的错误,可以将dll文件复制到C:WindowsSystem32目录下。
最低0.47元/天 解锁文章
953

被折叠的 条评论
为什么被折叠?



