我使用JDBC使用集成安全性在本地连接到SQL Server 2005。失败了:
Error: 17806, Severity: 20, State: 2.
Logon SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 127.0.0.1]
Logon Error: 18452, Severity: 14, State: 1.
Logon Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: 127.0.0.1]
但我可以使用127.0.0.1
成功连接。仅当我提供localhost
时,连接才会失败。
我的连接网址
jdbc:sqlserver://LOCALHOST:1433;DatabaseName=master;integratedSecurity=true