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

Boston Housing Dataset Missing From UC Irvine's Site

I'm putting together a series of blog posts on Python for R programmers, and I figured I'd use the Boston dataset of Boston housing prices.  It's a pretty well-known dataset for regression, and it's included in R in the MASS package and in Python in sklearn.datasets .  I know the data originally came from UCI, so I wanted to give credit where credit was due. When I clicked the first few Google links that appeared, I got this message on the UCI site: I'm sorry, the dataset "housing" does not appear to exist. Weird that they're not linked at all, but I found these links. Here's the link to the dataset in their archive. Here's the link to the data dictionary. Enjoy!

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...