Skip to main content

“Cannot generate SSPI context” error message - SQL Server connectivity issue

We were doing a ton of stuff to a named instance of SQL Server at my office yesterday, our QA SQL server to be exact, which sits on the same hardware as our development server. We didn't really do anything to our development (default) instance, other than reboot both nodes of the cluster about six times. Granted, this is going to cause some issues with connectivity, but as there are only two other developers, we were able to keep busy with other projects during the multiple failovers.

For some crazy reason, after I left last night, one of my developers couldn't connect to SQL Server anymore. I put a screenshot up from an application she's developing that connects Access 2007 to SQL 2005 (don't worry, this is a very small application connecting to a database with a very small user base).

I tried running NET TIME on her machine and on the node of the cluster that had ownership of SQL, but that didn't work. I couldn't imagine that the time was different between two nodes of the same cluster, so I didn't bother running it on the other node.

I tried a tracert to the server name, which went out to the Internet. That was strange but not the issue, I don't think.

I deleted and recreated the alias to the server in Configuration Manager. No luck.

I logged onto her machine as me, and was able to connect. Out of curiosity I checked her default database. When I tried to run SETUSER in that database to impersonate her account, it wouldn't let me, giving me an SSPI context error.

I set her default database to one she had user rights in, and that fixed the problem.

I'm really not sure how this could have happened, but it did. I'm just glad to have fixed it relatively quickly. I know there can be all sorts of causes of the dreaded SSPI error, and I just wanted to share what worked for me.

Comments

Popular posts from this blog

Introduction to Artificial Intelligence - Microsoft - DAT263x on edX

Recently, my company encouraged us to learn more about Azure ML Studio.  A little Googling led me to a course on edx.org offered by Microsoft called Introduction to Artificial Intelligence .  While it was at least 50% advertisement for some of Microsoft's cloud-based AI offerings, it was definitely worth the 10 or so hours I put into it over the last 24 hours. This was a fairly high-level course that discussed aspects of statistical techniques like regression, categorization and clustering, as well as more advanced concepts including artificial intelligence (AI), natural language processing (NLP), and chatbots.  Overall, what I learned wasn't so much about these topics, but how much Microsoft's ML Studio has to offer in the way of getting you up and running quickly and easily with these technologies. Having said that, it's Microsoft, and there were several things that didn't work as they should have, as I expected.  Full disclosure:  I'm an AWS certified ...

I'm Just Here for the Carnage - RoboGames 2007

So here I am in San Francisco, right on the water at Fort Mason for one of the "top geek events" in the U.S. (as proclaimed by Wired magazine).  Let me tell you, if you've never had a cocktail mixed by a robot, you haven't lived. Last night, some dudes brought in a serious robot - a biotech machine - that allowed them to make perfectly-layered B-52 shots.  Each layer was measured out in picalitres. Today, Roboexotica's Cockbot 1 is mixing and serving daquiris, Campari/oranges, and screwdrivers. This is actually Cockbot 1. I can't wait for tonight, when a flamethrowing 151 and Kahlua bot will be shooting a yard's worth of fire to ignite highly-flammible liquor. Stay tuned...