cancel
Showing results for 
Search instead for 
Did you mean: 

New SQL Databse

Former Member
0 Kudos

I have a DB that I stupidly detached when I was having problems with it (corrupt LDF it seems). Unfortunately this (previously assumed unimportant) DB has no backup history. I have recently inherited this server.

So I have the mdf and I am trying to create dbname file = ....mdf for attach/repair/rebuild
No matter what I try I get the same error saying that :
The header for file 'g:\sqllogs\dbname.LDF' is not a valid database file header. The PageAudit property is incorrect.  I've tried the sp_attach_single_file_db but that also complains about the LDF.
What are my options to retrieve this db?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

“I've tried the sp_attach_single_file_db but that also complains about the LDF.”


Either rename the existing log file or move it to a different folder from where it was when it was detached.
IF you have the original mdf, before any attaches were tried, copy that back over the mdf that has previous attach attempts.  If possible, always go back to a fresh, non-previously-attached version of the mdf to attempt a new attach.

Then, and only then, try the :


EXEC sp_attach_single_file_db


If all is unsuccessful, then you can try this sql mdf repair tool like MDF Repair Kit. There is a demo version and you can make a choice it useful to you or not. http://www.mdf.repair/

Also if you have tried the sp_attach_single_file_db and has not been successful then check out Paul Randal's suggestions here:

http://social.msdn.microsoft.com/forums/en-US/sqldisasterrecovery/thread/189be01f-23de-48b0-96cc-8f1...

Answers (1)

Answers (1)

clas_hortien
Active Contributor
0 Kudos

Hello,

please open an OSS Case for this in component BC-DB-MSS, so that we can help you.

Best regards

   Clas Hortien

Former Member
0 Kudos

Ok, thanks)