Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Recover Deleted SQL Database

Posted on 2010-09-11
9
Medium Priority
?
482 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

721 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