System crashed, MS SQL Server 2008 corrupted

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
richardr
New user
New user
Posts: 5
Joined: 2009-10-15 23:28

System crashed, MS SQL Server 2008 corrupted

Post by richardr » 2009-10-15 23:38

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

User avatar
mattg
Moderator
Moderator
Posts: 21186
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: System crashed, MS SQL Server 2008 corrupted

Post by mattg » 2009-10-16 15:06

did you try uninstalling the database and then reinstalling before restoring the backup?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: System crashed, MS SQL Server 2008 corrupted

Post by sheffters » 2009-10-16 15:08

looks like a permissions screwup somewhere.

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

S.

richardr
New user
New user
Posts: 5
Joined: 2009-10-15 23:28

Re: System crashed, MS SQL Server 2008 corrupted

Post by richardr » 2009-10-16 22:36

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

User avatar
martin
Developer
Developer
Posts: 6837
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: System crashed, MS SQL Server 2008 corrupted

Post by martin » 2009-10-16 22:40

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. :-\

richardr
New user
New user
Posts: 5
Joined: 2009-10-15 23:28

Re: System crashed, MS SQL Server 2008 corrupted

Post by richardr » 2009-10-20 10:44

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

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: System crashed, MS SQL Server 2008 corrupted

Post by sheffters » 2009-10-20 11:35

no worries ... thanks for posting solution :)

S.

Post Reply