SQLTeam.com | Weblogs | Forums

Data Corruption Issue Can anybody attach this MDF


#1

Hello all, I am very desperate for a solution to this issue. I am an IT technician and I know nothing about SQL server but I accidentally overwrote the database that had all of a stores inventory with a blank database. There is no backup file and all I managed to salvage was the mdf before overwriting the database. The LDF no longer matches. I have pretty much gave my self a crash course on SQL trying to fix the database but have failed miserably. I have single handedly sent this business into the stone age and am desperate for help before they take legal action. Here is the link to the MDF in question

Somebody please help me :confounded:


#2

Have you tried attaching the MDF file?

https://msdn.microsoft.com/en-us/library/ms174385.aspx

If so, what messages did you get?

Even though it's probably obvious to you now, make sure you keep several copies of that MDF file handy. DO NOT try to attach or otherwise modify it until that's taken care of.

I suggest you read this article to get some background on how to proceed with a repair:

Paul has a lot more disaster recovery techniques if that doesn't help:

If all else fails, you may be able to browse a copy of the MDF file with this:

And don't lose hope! Paul mentions this guy:

And needless to say, if you do recover the database, BACK THAT UP IMMEDIATELY AND MAKE SURE THE BACKUP CAN BE RESTORED. You should also run DBCC CHECKDB to see if there's any corruption.


#3

I've tried most of those and I keep getting stopped. I even had SQL Developers at my job try to assist me with this issue with no progress. I was able to restore an old back up from 6 years ago. However the prices are incorrect and there many items missing.

The one glimmer of hope I have is the demo of a program called Kernel SQL Database recovery. This is only the evaluation version but it is able to at least show items in the database but it won't allow me to copy and paste or save the data. The software is $300.00 which I don't have but does anyone know how this program is able to view the "corrupt" database? Is there a free way to do this with any other software that will allow me to extract the contents and rebuild the database? Please somebody help me I have barely got any sleep trying to figure this out and the customer is understandably beyond pissed off and getting impatient :cold_sweat:

Below is a screenshot of the software viewing the actual database thats corrupt.
http://s28.postimg.org/xl6zbcwpp/kernel.jpg

nm because I'm a new user it wont allow me to post images but thats the link


#4

The only free tool I know of that works directly with MDF files is OrcaMDF, which I posted earlier. I wouldn't be too surprised if Kernel (or similar) tools use OrcaMDF as a foundation, since the code is freely available.

I made some attempts to attach it but had permissions errors for some reason. I may try again over the weekend and will let you know if I make any progress.


#5

Thanks for your help. The most common errors I've been running into while using the recovery methods above are incorrect login for 'sa' or Windows Login does not have rights to read file. The other one was something about cannot open version 611 file please upgrade or something of that nature, I know I should have got screen shots. I'm downloading ORCAmdf now to see if I can do anything. I'm no programmer so the source code is like greek to me but I'm really desperate and willing to try anything.


#6

You can also contact the author, Mark Rasmussen. He's built an MDF file viewer based on OrcaMDF, I've seen him demonstrate it in presentations. His email should be on the blog somewhere, or some kind of contact page.