on 08-22-2016 2:31 PM
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?
“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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
please open an OSS Case for this in component BC-DB-MSS, so that we can help you.
Best regards
Clas Hortien
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.