Monthly Archives: July 2010

Tell Me What’s Wrong, Please

I recently finished college – graduated in May – and started working at my first job. I have now officially been a developer at Sonoma Partners for two weeks.

Due to the fact that I like Linux and open source software in general, it has been a bit of an adjustment to transition to a place where almost every tool or technology I use is provided by Microsoft (Sonoma Partners is a Microsoft partner which sells, customizes, and provides consulting services for Microsoft Dynamics CRM software). Some might say that I have sold out to the man (in fact, several people already have), but I figure that as long as I am not paying for Microsoft software, I have no problem using it.

At least, that’s what I was thinking when I accepted the position. For the most part I still feel that way, but lately it seems like I’ve been spending a ridiculous amount of time troubleshooting installation/configuration errors and not very much time actually doing useful stuff. It’s not even the errors that I’ve been getting that I really have a problem with – it’s the error messages. If my software messes up, I would like it to at least tell me what happened that made things go wrong.

Here is an example of an error message that I got (after searching through the log – the original message just told me that my login failed) using Microsoft SQL Server 2008 yesterday:


Error: 18456, Severity: 14, State: 11.
Login failed for user 'DOMAIN\user'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: ]

Now, that seems straightforward enough, except that it says something about an infrastructure error, which made me think that something with the actual application went wrong, not just that I have the wrong login. Furthermore, when I checked on that “State: 11″ business, I found that it means “Valid login but server access failure” (see here for reference). That made me think that something was wrong with my attempts to access the server, as well.

After a bunch of troubleshooting, I finally found out that it wasn’t any sort of strange problem, but rather a case of my Windows Authentication account not being a user in the database instance. All I had to do to fix my problem was start the database instance in single-user mode (by adding “-m” to the start-up parameters, see here for details), make sure that there were no other programs running that were connecting to the database instance, and add myself as a user.

So yeah, Microsoft, I’d like to see some better error messages. Why can’t you tell me that that user doesn’t exist in the database? That would be fantastic – please don’t give me this crap about it being for security reasons.

To see the forum thread that finally got me on the right track, go here.