重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 677|回复: 0
打印 上一主题 下一主题

SQL Server的错误日志出现SSPI handshake failed with error code 0x8009030c

[复制链接]
跳转到指定楼层
楼主
发表于 2023-3-1 15:24:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 jiawang 于 2023-3-2 09:13 编辑

02/15/2023 14:24:12,登录,未知,Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [客户端: 172.26.50.170]
02/15/2023 14:24:12,登录,未知,错误: 18452,严重性: 14,状态: 1。
02/15/2023 14:24:12,登录,未知,SSPI handshake failed with error code 0x8009030c<c/> state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext 失败。Windows 错误代码指示失败的原因。  [客户端: 172.26.50.170].
02/15/2023 14:24:12,登录,未知,错误: 17806,严重性: 20,状态: 14。
02/15/2023 14:23:53,登录,未知,Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [客户端: 172.26.50.170]
02/15/2023 14:23:53,登录,未知,错误: 18452,严重性: 14,状态: 1。
02/15/2023 14:23:53,登录,未知,SSPI handshake failed with error code 0x8009030c<c/> state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext 失败。Windows 错误代码指示失败的原因。  [客户端: 172.26.50.170].
02/15/2023 14:23:53,登录,未知,错误: 17806,严重性: 20,状态: 14。

SSPI(Security Support Provider Interface)是transport-level 应用程序(比如,Microsoft Remote Procedure Call ,RPC)和安全提供程序(比如,Windows Distributed Security)之间的接口,SSPI允许传输应用程序调用安全提供程序来获取经过安全验证的连接。

在具有可信任连接的Windows 身份验证的连接字符串中,通常使用以下参数:

    Integrated Security=SSPI

关于SSPI错误通常有两个:

    Cannot generate SSPI context :当客户端尝试进行Kerberos身份验证时,通常或收到此错误
    SSPI Handshake Failed:用户没有通过身份验证

在当前的问题中,我们遇到“SSPI handshake failed”,这表明SQL Server无法验证用户。

为了进一步调试错误,我们在出现问题的时候在Windows的事件查看器(Event Viewer)中查看了安全日志,

    SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The operating system error code indicates the cause of failure. The logon attempt failed   [CLIENT: x.x.x.x]

我们从SQL Server的错误日志获得了同样的错误:

    Login failed. The login is from an untrusted domain and cannot be used with Windows authentication

出现此问题的原因是:有一个Login视图通过“SQLClient”来连接SQL Server,但是因为因为没有授权,登录失败。

解决方法是授权该Login相应的权限,使其有权限访问SQL Server。

在解决SSPI Handshake Failed的错误时,需要仔细检查时间查看器的Security Log和SQL Server的错误日志,它们可以提供大量有用的信息。

参考文档:

Common ‘SSPI handshake failed’ errors and troubleshooting



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-20 07:09 , Processed in 0.082817 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表