SSPI 握手失败,错误代码为 0x8009030c,同时建立具有集成安全性的连接 [英] SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security

查看:116
本文介绍了SSPI 握手失败,错误代码为 0x8009030c,同时建立具有集成安全性的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 JDBC 连接连接到 SQL Server 2005 时出现以下错误.

I get the following error while trying to connect to SQL Server 2005 using JDBC connection.

 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]

我的连接网址:

jdbc:sqlserver://LOCALHOST:1433;DatabaseName=master;integratedSecurity=true

推荐答案

这个问题的关键,至少对我来说,是与 SQL Server 的连接是通过环回接口 (127.0.0.1) 建立的.我有同样的症状,并在 这篇博文.

The key to this issue, for me at least, is the fact that the connection to SQL Server is being made over the loopback interface (127.0.0.1). I had the same symptoms, and found the answer in this blog post.

总结:发生了环回检查,导致通过环回适配器的可信连接失败.可以通过添加如下注册表项来删除此检查:

To summarise: there is a loopback check taking place which causes trusted connections via the loopback adapter to fail. This check can be removed by adding a registry entry as follows:

  1. 使用 regedit 编辑注册表.(开始 -> 运行 ... Regedit )
  2. 浏览到:HKLM\System\CurrentControlSet\Control\LSA
  3. 添加一个名为DisableLoopbackCheck"的 DWORD 值
  4. 将此值设置为 1

我在进行此更改后重新启动,只是为了确定,但您可能会发现这不是必需的.在此注册表更改生效后,我可以通过环回适配器建立可信连接.

I rebooted after making this change, just to be sure, but you may find that this is not necessary. After this registry change was effected, I could make trusted connections via the loopback adapter.

感谢 Blackhawk 咨询博客为我指明了有关此问题的正确方向.

Kudos to the Blackhawk Consulting Blog for pointing me in the right direction on this issue.

这篇关于SSPI 握手失败,错误代码为 0x8009030c,同时建立具有集成安全性的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆