Saturday, March 26, 2011

Brilliantly unhelpful error messages

SQL Server is not working, as usual. It was working, praise Dog. Then it stopped, yet again.

I go to the SQL Server Configuration Manager and see that the SQL Server Agent is stopped, despite the fact that it's start mode automatic. I try to start the service, and after an annoying delay, I get the error message:
The request failed or the service did not respond in a timely fashion.
Consult the event log or other applicable error logs for details.
A nice error message would provide a link to said log. A mediocre message would have suggested where this log might exist. The crappy message provided tells me squat. So I turn to Google (which does a MUCH better job of searching Microsoft forums than the forums' built-in facility).

Happy Day! Eventually I find a log that has my SQL Server error logged! Calloo! Callay!

It turns out that the magic incantation is:

Control Panel ->
Administrative Tools ->
Event Viewer ->
Windows Logs ->
Application.
Later, I notice that Event Viewer -> Custom Views -> Adminstrative Events is probably more efficient; it appears to show just the errors and warnings.

Happy that my random clicking around the Event Viewer has led me to the promised land, I click the SQL Server error to get that vital bit of information that will finally allow me to get this POS working. Revealed:
SQLServerAgent could not be started (reason: Error creating a new session).
Which, of course, conveys nothing useful -- not useful to me, anyway. What a shock.

It's yet another victory for the Microsoft frustration-spewing machine called SQL Server.

A wonderful, hilarious book is Good Omens by Neal Gaiman and Terry Pratchett. The relevant passage has a Demon of Hell bragging about a spectacularly jammed highway system. "That was one of ours." The horrible traffic causes thousands of people to think uncharitable thoughts and even take The Lord's name in vain, every day.

I have to imagine a demon saying, with a very self-satisfied tone: "SQL Server. Oh yeah, that was one of ours."