Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Recover Deleted SQL Database

Posted on 2010-09-11
9
Medium Priority
?
492 Views
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 officerecovery.com. 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.
0
Comment
Question by:Ctritz
  • 4
  • 3
  • 2
9 Comments
 

Author Comment

by:Ctritz
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?
0
 
LVL 1

Expert Comment

by:maxxerific
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

http://www.runtime.org/data-recovery-software.htm     

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.  
0
 
LVL 3

Expert Comment

by:mehdi_javan
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.
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 

Author Comment

by:Ctritz
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.
0
 
LVL 1

Expert Comment

by:maxxerific
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.

0
 

Author Comment

by:Ctritz
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 recovermyfiles.com. 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....
0
 
LVL 3

Expert Comment

by:mehdi_javan
ID: 33654358
What about Norton UnErase?
0
 

Author Comment

by:Ctritz
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.
0
 
LVL 1

Accepted Solution

by:
maxxerific earned 2000 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.



0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
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.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

783 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