Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 MS SQL Server Data recovery using Transaction Log
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 09/28/2006 :  06:57:36  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
murty writes "Hi,

by mistake the MDF File was deleted. now i am left with LDF file only... the data is very important. Can recover the Data using LDF? i have a full backup(.BAK) upto lastmonth.


Flowing Fount of Yak Knowledge

5581 Posts

Posted - 09/28/2006 :  07:22:49  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
There is nothing that SQL Server provides for cases like that...but you can use third-party tool like ApexSQL Log. Check out the following link:

Harsh Athalye
"Nothing is Impossible"
Go to Top of Page

Most Valuable Yak

15732 Posts

Posted - 09/28/2006 :  07:28:30  Show Profile  Visit robvolk's Homepage  Reply with Quote
Here's an idea, but I don't recommend it for anything other than DIRE EMERGENCIES. I've never tested it. You absolutely should NOT use this as a standard data recovery technique. Improve your backup schedule instead, and you'll avoid the problem entirely.

1. Restore the backup to a new database with a different name.
2. Detach the new database.
3. Delete the new LDF file and copy the original LDF file into its place.
4. Attach the new DB using the new MDF and old LDF files.

This probably will NOT work, and it won't work unless your database was in full recovery mode AND you never backed up the log for the entire month. If the DB was in simple recovery, forget it, that data is gone.
Go to Top of Page


United Kingdom
22859 Posts

Posted - 09/28/2006 :  08:20:11  Show Profile  Reply with Quote
If you attached "any old MDF file" would you be able to do one final Transaction Log Backup? (Assuming: all the Tlog stuff is in the LDF file, and it can be Backed up without referencing, per se, the MDF file - does that sound likely?)

Then restore the last-month's-full-backup followed by any previous TLog backups (since the last full backup) and then finally the just-saved-TLog-backup.

But as Rob said the database would have to be in FULL recovery model

Go to Top of Page

Starting Member

14 Posts

Posted - 10/27/2009 :  05:23:38  Show Profile  Visit Davidpoul's Homepage  Reply with Quote
Its quite difficult to recover data without mdf file. As you are saying that you have the ldf file. ldf file is the log file while mdf file is the master database file. Your whole data is saved in mdf file. I am not sure that you recover your data but try the suggestion given by others.

David Poul
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000