none
Cannot generate SSPI context. (.Net SqlClient Data Provider)

    Question

  • I have upgraded SQL SERVER 2000 standard edition server to SQL server 2008 with SP1 standard edition. No errors noticed. OS is Windows server 2003 with sp2, Service accounts are configured using domain user account, and mixed mode authentication is enabled.

    Both windows and SQL authentications are working fine from the local (server), able to access all SQL server resources.

    Server is accessible remotely using SQL authentication, but unable to connect with windows authentication, though user has local admin and SQL admin rights on the server.

    Let me know any solutions for this. Appreciate your support

    Monday, July 12, 2010 6:19 AM

All replies

  • I have seen once that date and time were different on the server and client machine...
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, July 12, 2010 6:45 AM
  • Thanks Uri for the quick response. I matched the clinet date time with the server date time, still the same error.

    Thanks

    VM

     

    Monday, July 12, 2010 7:07 AM
  • Hi,

    Have you changed your Windows password before you try to connect to the SQL box? If you did, try to log off and log in again. If the problem still persists, try this article for troubleshooting.

    I hope it helps.

    J.


    There are 10 type of people. Those who understand binary and those who do not.
    Monday, July 12, 2010 8:06 AM
  • Thanks Janos.

    I reset the windows password but no use. Also i tried this document already , it is also not helping me with my situation.

     

    Thanks

    VM

    Monday, July 12, 2010 6:33 PM
  • Problems with Kerberos authentication often result in SSPI errors. For hints about the root problem, look in the Windows event log for other errors near the SQL Server authentication attempt.
    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty
    Tuesday, July 13, 2010 3:58 PM
  • I'm having the same problem.  I've uninstalled and reinstalled SQL to no avail.
    Tuesday, September 28, 2010 11:06 AM
  • Is this error for every user or only some users?  Have a read at this article; SSPI Context errors are pain to resolve in most cases.
    • Proposed as answer by Ramshna Wednesday, September 29, 2010 10:14 PM
    Tuesday, September 28, 2010 4:22 PM
  • I faced this issue lot of times. This error is displayed due to issues with kerberos authentication, especially when you are using domain account to run the SQL services. You can refer to http://support.microsoft.com/kb/319723 for more info.
    Wednesday, September 29, 2010 10:19 PM
  • check your SQL Server's registered ServicePrincipalNames on AD using SETSPN.exe and remove entries starting with MSSQLSvc - looks like SQL2008 don't like them
    Tuesday, November 23, 2010 2:43 AM
  • I am getting same error but in Windows server 2008 standard edtn installed, SQL server 2008 Standard edition
    "SQLSERVER DBA" "INDIA"
    Wednesday, January 12, 2011 6:03 AM
  • Make sure that the account that runs SQL Server Service has the correct password -I was getting the same error after changing the account password-. Note that with the wrong password, the server was running fine , Both windows and SQL authentications were working fine from the server, and Server was accessible remotely using SQL authentication.

    Tuesday, February 08, 2011 12:53 AM
  • Tks,

    This solve my problem!! :)

    Tuesday, February 08, 2011 1:15 PM
  • I know this is a little old, but thanks for the info. I was receiving the same "Cannot generate SSPI context" error message. After I set all my SQL services to LogOn as Local System, everything started working correctly. I plan on testing Step 3 from Ramshna's link (http://support.microsoft.com/kb/319723) some day soon, once our AD admins are available for consult. Hopefully all works out correctly.

     


    Thursday, May 05, 2011 1:27 AM
  • I received this error
    and solved by restarting "DNS Client" service from services.msc
    Friday, February 17, 2012 6:19 AM
  • Thanks Sherwyn this working for me ..

    a remove the all the MSSQLSvc in the ServicePrincipalNames, then i reboot the sqlserver.

    and it's working

    Wednesday, September 26, 2012 9:53 AM
  • Can someone give me a understandable resolution to this problem, I cannot reboot my server everytime my VPN has droped. I am not an SQL Server expert. But, I now when the VPN has reconnect after ADSL line has droped and my server reconnect to the host domain and works fine. Why does the SQL server replication not want to reconnect to the Host server?
    Wednesday, November 21, 2012 7:36 PM
  • Suggest that you start a new thread for your question.

    If you do, plesae provide additional details such as Windows and SQL Server versions, protocols in use, and so forth.  Also describe your replication landscape.   Since replication is your problem, you probably want to post your question at this forum:

    http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/threads

    RLF

    Wednesday, November 21, 2012 8:47 PM