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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.