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

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!