Page 1 of 1

System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-15 23:38
by richardr
My computer that is running hMailServer 5.1 crashed, and now my MS SQL Server Express 2008 database for the mail server is apparently corrupted.

When I go into SQL Management Studio, the hMailServer database is not shown under "Databases". When I do a refresh, I get the following error message:

Failed to retrieve data for this requestion (Microsoft.SQLServer.Management.Sdk.Sfc)

Additional Information:
-> An exception occurred while executing a Transact-SQL statement or batch
-> The server pricipal in "MyDomain\Administrator" is not able to access the database "EmailDB" under the current security context (Microsoft SQL Server, Error 916).

I figured, okay, I would just restore a recent backup. That got me this error message:

An exception occurred while executing a Transact_SQL statement or batch.

Additional Information:
-> CREATE DATABASE permission denied in database 'master'.
RESTORE HEADER ONLY is terminated abnormally (Microsoft SQL Server, Error 262).

Just wondering if anyone else has encountered this issue? And if so, what's the recommended steps to resolve it?

TIA,

Richard

Re: System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-16 15:06
by mattg
did you try uninstalling the database and then reinstalling before restoring the backup?

Re: System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-16 15:08
by sheffters
looks like a permissions screwup somewhere.

you changed the admin password when you sorted out ya server? or the MSSQL SA password altered?

S.

Re: System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-16 22:36
by richardr
Thanks for the replies.

To address them, nope, I did not change any passwords. To be precise the crash was the power supply going out. After replacing it, Windows booted just fine. The only issue I'm having is this issue with SQL Server.

And while the thought of deleting the database did cross my mind, SQL Server Management isn't even showing the database so I can delete it.

I'm open any other suggestions anyone might have before I restore a backup image of C:.

Richard

Re: System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-16 22:40
by martin
I can't recall ever having heard of a power outage causing a MSSQL database to disappear from Management Studio. You must have been pretty unlucky...

Here's a Microsoft KB item mentioning the error message you get:
http://support.microsoft.com/default.as ... -US;956179

I doubt it's helpful in actually fixing the cause though. But maybe you can follow the steps, drop the database and then restore the backup you have. :-\

Re: System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-20 10:44
by richardr
Just in case anyone else reads this thread, what I did to fix my problem was:
(1) uninstalled SQL Server Express 2008;
(2) deleted the Program Files\Microsoft SQL Server folder;
(3) reinstalled SQL Server Express and then reload the back up I had of the hMailServer database.

The couple emails that was received after the backup is not showing up in the mailbox. But, I suspect those emails are still on the disk. I just haven't looked for them yet.

Thanks to everyone that responsed.

Richard

Re: System crashed, MS SQL Server 2008 corrupted

Posted: 2009-10-20 11:35
by sheffters
no worries ... thanks for posting solution :)

S.