Tag Archive for Miscellaneous Debris

SQL Server Woes.

I am not a SQL Server Guru, I admit. Far from it, actually. But still, this shouldn’t be this hard.

I was cheerfully punching away Sharepoint code on my Win2003 machine, when suddenly the power died. Cries of alarm, black smoke from the generator – the works. Not too much of a problem, since I am a reflexive (not to say spasmodic) CTRL-S presser, so it was just a matter of waiting for the power to come back and resume working.

Except that when it did, it seemed my SQL Server (2000, sp3a) decided to call it quits. Whenever I would start the service, it would immediately after launching die again, with an event-log message that the LSN passed to the ‘model’ database was incorrect.

Some checking revealed that the LSN is the Log Sequence Number, and my guess is that the power failure happened exactly while it was processing transaction logs – but should that be fatal?

Furthermore, if it is – shouldn’t there be any way of clearing it up? Is there no command-line tool to let me declare the DB consistent?

What I was forced to do, eventually, is copy my MBF files aside, run the rebuildm.exe command to rebuild the Master database from the original CD, and then re-attach my databases – luckily unharmed and unchanged.

“O frabjous day! Callooh! Callay!”

It doesn’t work.
The lights have long since been turned off. Your eyes are red and sore and there’s a stack of empty coffee cups threatening to teeter-totter off of your desk and into your lap.
And it doesn’t work.
You’ve been working on this nagging bug, this annoying program, this insignificant technical NOTHING for hours.
But it just doesn’t work.
And then it comes! the flash, the light, the little cherubs blowing silver trumpets in your mind. Maybe a corworker passed by and idly pointed it out. Maybe your eyes have started looking sideways at your code in frustration. Whatever the reason – it’s OVER. You’ve fixed the bug. The code works. You can go home now.

We’ve all been there. We’ve all banged our heads against the wall in frustration because of some stupid bug or undocumented API. We know the relief that comes when you finally get past it.

So this is what my blog is for. To relieve my frustration when I can’t get something to work, and to gloat in exultation when I finally can.