Recover Deleted SQL Database

Posted on 2010-09-11
Last Modified: 2012-05-10
I have a database that was deleted through SQL Server Management studio, using right click / delete option. This is a mirrored database, and someone had configured SQL Management to the wrong server. I need to recover this database if at all possible. I have  a backup, but it is about ten days old. (Backup software failed, whole different problem)

I ran a utility on the drive the database was stored on, it is free undelete from The utility can find the deleted file, and it actually recovers it, but the data in the .MDF file is empty showing a size of 0k. Any suggestions, my job may be at risk.
Question by:Ctritz
  • 4
  • 3
  • 2

Author Comment

ID: 33653751
Update: The log file for the deleted database is available and fully recovered. Thinking of doing a database restore from the backed up database from 10 days ago and restoring it from the most recent log file... Any other suggestions?

Expert Comment

ID: 33653933
is this on a remote host? if so you might get lucky.
    Although someone had misconfigured your mirror backup, most decent hosts will have daily backup snapshot policies and keep them for a few weeks. I've been saved before by going to my host for a backup.

Other that that, I have heard bad things about free undelete. Its possible it was only capable of finding a symbolic link (like a shorcut on the drive), which is why it shows 0 file size.

You could try a better recovery tool (i've always been a fan of getbackdataforfat     

I do not think the log file is going to help you, unfortunately. If you cannot find the DB backup, you are almost certainly out of luck.  

Expert Comment

ID: 33654125
I think other file system recovery tools like Norton UnErase can help you recover mdf and ldf files of your database. You should try some other tools before installing any new program or copying new data on the drive that your database files used to be on.

Author Comment

ID: 33654141
The utility from runtime definitely sees the .mdf file, purchased the software, but I am getting the same result. It is recovering the file as 0k, no data.  The "Get Data Back" console is also showing the .mdf file as 0k in the console.
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.


Expert Comment

ID: 33654173
Hi again,
   1st make sure to follow mehdi_javan's advice: make sure no new files are copied to the drive. If possible to all analysis on the dirve from a second computer / HDD
 Before you give up hope,  there is another thing you should check: it is possible your file recovery software is not seeing the file extension and so the actual DB is there, but is not immediately recognizable.
Have a look at your old DB and see approximately how large the file is.

Search through the recovered files for documents which are approximately the same size. Because you are looking for a recent database, you can restrict your search to the most recent files by timestamp (which get data back" should still see) so the number of files to examine as candidates sholdn't be overwhelming.

I'll have to say that if this is the case, the chances of finding a complete, uncorupted databse file seem slim - expecially as SQL  file structure  is not very tolerant of errors.


Author Comment

ID: 33654320
Thanks for the replies.

I have looked through all of the files in the "Get Data Back" utility. The database is definitely listed where it should be and is showing it was deleted. It is still showing a 0kb size. Looked through the entire list of available files,  and I am not finding the file anywhere else.... nothing near the size of our database.

I have not copied any new files to the drive, and I am not running any utilities on the drive.

I also tried a utility called "Recover My Files" from Still getting the same result. From that utility. It sees the deleted .mdf file, but is showing it as no data inside..... 0kb.

Not sure what else I can try....

Expert Comment

ID: 33654358
What about Norton UnErase?

Author Comment

ID: 33654469
I looked for the Norton software, and could not find a download. I found that back in 03 Norton included the Unerase as part of their System Works package which looks to be no longer available. Norton has a current "Recycle Bin" type tool, but I can not find any Symantec or Norton deleted file recovery tools.

Accepted Solution

maxxerific earned 500 total points
ID: 33654497
personally, it doesn't seem like a third piece of software is going to give you different answers.

get data back even shows you file clusters which are partially overwriten in memory. so, if you see the DB in the place you expect it to be and it still shows as 0kb and you cannot find any file  that could be the databse (same size for example),
you are probably not going to be able to recover it.


Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why does this keep coming up NULL? 2 43
MS SQL page split per second is high 19 74
Set the max value for a column 7 37
Passing value to a stored procedure 8 89
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now