Few months back, I installed a sql server 2005 on one of my client machine. I gave him a backup option to take backup timely but he never took any backup.

Today he called me that "i m not able to see any record of mine." I visited at my clients system and saw that none of the record was present on the tables. There was not even a single row in any of the tables. Then I checked if he has any backup file which i found to be absent.

I asked him the reason what could be the possible cause. He said it might be due to virus.

After this I checked the size of mdf and ldf file and found it should be what it is. when i created his server mdf ldf file had 2MB of database now it is 83 MB and 193Mb mdf/ldf respectively.

This shows the data is still present in it but it is not being displayed.

What could be the possible cause and how can i restore all data back to my tables ?


You can't judge by the size of the file. If he ran DELETE * FROM table on every table, the size of the database would be the same until he ran DBCC SHRINKDATABASE.

I'd copy the file, and open it up in an editor, and see if there is actually anything in it. Or you could just try and SHRINK it. If it shrinks to nothing, it's empty. (Again, make a backup).

A complete loss of all data sounds like a user problem to me. No backups, no data, mysterious virus? COULD be a virus, but it's just as likely it was user error.

  • 1
    Yeah. Looks like "user too stupid to keep the data exception" to me, too. – TomTom Mar 29 '10 at 16:56
  • more like "user to stupid to listen to admin" - which seems to be a persistent bug – Jim B Mar 29 '10 at 23:16

As the DB structure is seemingly intact (which you should check), the most likely cause is someone messing around in the DB directly, perhaps to bypass some business logic in the app using it. A virus? Extremely unlikely.

The data would appear now to live only in the transaction log. You may be able to use a product like Apex SQL Audit or Quest's Litespeed For SQL Server to view the log, see what happened and possibly restore the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.