zoukankan      html  css  js  c++  java
  • SQL Server使用侦听器IP访问时遇到"The target principal name is incorrect. Cannot generate SSPI context"

    在测试SQL Server 2016 Always On时,在创建侦听器后,在客户端使用SSMS, 可以用侦听器名称访问Always On集群,但是使用侦听器IP访问时遇到"The target principal name is incorrect.  Cannot generate SSPI context"

     

     

    clip_image001[4]

     

     

    TITLE: Connect to Server
     
    ------------------------------
     
    Cannot connect to 192.168.7.64.
     
    ------------------------------
     
    ADDITIONAL INFORMATION:
     
     
     
    The target principal name is incorrect.  Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)
     
     
     
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476
     
     
     
    ------------------------------
     
    BUTTONS:
     
     
     
    OK
     
    ------------------------------
     

    测试环境是在一个与生产环境隔离的Vmware集群里面,而且DNS服务器也是克隆过来的,在测试环境的DNS服务器上, 这个IP(192.168.7.64)缓存有生产环境的对应的服务器名称。在命令窗口,使用下面命令确认即可。

     

    ping -a 192.168.7.64

     

    ping 侦听器名称

     

     

    解决方法,在DNS服务器上删除对应的记录,然后新增一条记录,然后在客户端使用ipconfig /flushdns清空DNS缓存记录,就可以使用侦听器IP访问Alway On

     

    关于The target principal name is incorrect.  Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)这个问题的其它可能情况,可以参考博文The target principal name is incorrect. Cannot generate SSPI context

     

     

     

     

    参考资料:

     

    https://blogs.msdn.microsoft.com/meer_alam/2015/05/10/the-target-principal-name-is-incorrect-cannot-generate-sspi-context/

  • 相关阅读:
    word2013下,公式居中,编号右对齐
    Linux系统下,anaconda3与系统python共存
    LeetCode: 496 Next Greater Element I(easy)
    LeetCode: 463 Island Perimeter(easy)
    LeetCode: 620 Not Boring Movies(easy)
    C++: 其他类型转string
    LeetCode: 412 Fizz Buzz(easy)
    LeetCode: 344 Reverse String
    LeetCode: 566 Reshape the Matrix
    LeetCode: 575 Distribute Candies(easy)
  • 原文地址:https://www.cnblogs.com/kerrycode/p/8426537.html
Copyright © 2011-2022 走看看