How To Fix Cannot Generate Sspi Context Error
Contents |
comments for SQL Server ★★★★★★★★★★★★★★★ SQL Server ConnectivityOctober 14, 200532 0 0 0 Users sometime see the cannot generate sspi context sql server 2008 r2 “Cannot Generate SSPI Context” error message. A very good source the target principal name is incorrect cannot generate sspi context sql server for troubleshooting the error is http://support.microsoft.com/default.aspx?scid=kb;en-us;811889. You can also find good information at Using Kerberos with the target principal name is incorrect. cannot generate sspi context. (.net sqlclient data provider) SQL Server. Here, I talk about one extreme situation: SQL server was running under Local System and was shutdown accidentally. The user then decides to run odbc sql server driver cannot generate sspi context SQL server under a different account, e.g local account, domain account etc., for whatever reasons. Then he/she hit this “Cannot Generate SSPI Context” error when the client tries to connect the server. Keep in mind this only happens when TCP is enabled for the SQL server and is used by the client
Sqlexception (0x80131904): The Target Principal Name Is Incorrect. Cannot Generate Sspi Context.
to connect the server.
What happened here is: When SQL server ran under Local System, it had successfully registered the Service Principle Name (SPN) for the service. The SPN is kept in the Active Directory and should be de-registered when the server is shutdown. Due to the accidental shutdown, SQL server failed to de-register the SPN. When the client connects to the server using TCP, it can find the SPN in the Active Directory and Kerberos will be used to perform the security delegation. However, the new account is not the correct container of the SPN, and Kerberos will fail. When this happens, some people may choose to reinstall SQL Server or even the whole OS. They may be frustrated by the fact that the problem is still there if local or domain account is again chosen as the service account. There for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and
System.data.sqlclient.sqlexception: Cannot Generate Sspi Context.
policies of this site About Us Learn more about Stack Overflow the the target principal name is incorrect. cannot generate sspi context. sharepoint 2013 company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags the target principal name is incorrect cannot generate sspi context c# Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only https://blogs.msdn.microsoft.com/sql_protocols/2005/10/14/cannot-generate-sspi-context-error-message-more-comments-for-sql-server/ takes a minute: Sign up Cannot create SSPI context up vote 20 down vote favorite 4 I am working on a .NET application where I am trying to build the database scripts. While building the project, I am getting an error "Cannot create SSPI context.". This error is shown in the output window (inside VS2008 screen) and the building process failed. http://stackoverflow.com/questions/1812541/cannot-create-sspi-context Please help on this. SQL Server is configured to work on Windows authentication & running as network service (these two things are must for my project). Please help on this. This error is not seems to be consistent. It was fixed in the past by restarting the machine, changing the system time to match the domain time and some suggestions in the net. Please help on this. sql sql-server security sspi share|improve this question edited Nov 9 '15 at 14:01 Brian Webster 17.4k37115199 asked Nov 28 '09 at 13:41 Prasanna 3102312 1 I got this error after I had changed my default DNS server addresses under my Network Adapter's IPv4 Properties. When I changed my DNS server back to default, it went away. –James McCormack Jul 19 '13 at 10:02 add a comment| 14 Answers 14 active oldest votes up vote 13 down vote accepted It's quite a common error with a variety of causes: start here with KB 811889 What version of SQL Server? And Windows on client and server? Local or network SQL instance? Domain or workgroup?
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About http://dba.stackexchange.com/questions/93389/error-cannot-generate-sspi-context Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange http://www.sqlservercentral.com/Forums/Topic1265396-1550-1.aspx is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how cannot generate it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Error: Cannot Generate SSPI context up vote 4 down vote favorite 1 When someone tries to connect to a SQL Server instance, the error shows up: It's not possible do generate SSPI context. Yesterday we had a blackout (don't know how to say this expression in cannot generate sspi English) and I had to shut down our servers. Looking for answers, I found this: SQL Server 2008 connectivity issue : cannot generate SSPI context But it doesn't help me, because they're working fine until yesterday. I don't want to change anything. But if a have to, I will change it. Obs: I can't restart the server now. Edit: Since I my answer, we haven't had any errors. sql-server sql-server-2008 authentication errors connectivity share|improve this question edited Aug 30 '15 at 13:06 Paul White♦ 29.6k11166265 asked Feb 20 '15 at 11:14 Rafael Piccinelli 1,486630 I've had this problem sorted by forcing a time reset from the server, all machines in the group policy span will go back to server time and then error its gone... Although thats my particular case, you can try =). –Nelson Casanova Feb 20 '15 at 11:37 Hello. Thats the problem. I can't restart the server, we have more than 500+ users online. I really can't figure out what to do. There's nothing usefull on the internet. –Rafael Piccinelli Feb 20 '15 at 12:04 1 Set the group policy from the server itself to automatically change the time for t
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 2008 » SQL Server 2008 Administration » Cannot Generate SSPI Context Cannot Generate SSPI Context Rate Topic Display Mode Topic Options Author Message sql server developersql server developer Posted Monday, March 12, 2012 11:12 AM SSC-Enthusiastic Group: General Forum Members Last Login: Thursday, January 14, 2016 10:18 AM Points: 158, Visits: 469 Hi,I'm receiving the below error when trying to connect to SQL Server 2008 R2 from a remote computer on the network using windows authentication. But i was able to connect with SQL Server authentication."Cannot Generate SSPI Context"Thanks, Post #1265396 Roy ErnestRoy Ernest Posted Monday, March 12, 2012 1:57 PM SSCrazy Group: General Forum Members Last Login: Tuesday, October 4, 2016 11:55 AM Points: 2,381, Visits: 6,849 The MSDN website has a step by step procedure to trouble shoot this. Take a look at this URL. -Roy Post #1265543 sql server developersql server developer Posted Monday, March 12, 2012 2:31 PM SSC-Enthusiastic Group: General Forum Members Last Login: Thursday, January 14, 2016 10:18 AM Points: 158, Visits: 469 Thanks Roy! The following fixed the issue.1. Switched the sqlserver service logon account to ‘Local System’2. Rebooted the server3. Switched the sqlserver service logon account to ‘Domain/Account’ 4. Rebooted the server Post #1265565 anthony.greenanthony.green Posted Tuesday, March 13, 2012 2:28 AM SSCertifiable Group: General Forum Members Last Login: Thursday, September 1, 2016 2:56 AM Points: 5,969, Visits: 6,067 I've also seen this also happens when SQL starts before AD.In an old job, the AD servers took ages to come up after testing a scheduled power outage, say they took 10 minutes to boot, but SQL only took 5 minutes, just a simple restart of the SQL services resolved it for us once AD was back up and running, just incase you ever run into something like this. Want an answer fast? Try hereHow to post data/code for the best help - Jeff ModenWhen a question, really isn't a question - Jeff SmithNeed a string splitter, try this - Jeff ModenHow to post performance problems - Gail ShawCrossTabs-Part1 & Part2 - Jeff ModenSQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola HallengrenManaging Transaction Logs - Gail Sh