SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

AskSQLTeam
Ask SQLTeam Question

USA
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.


Regards
Murty"

harsh_athalye
Flowing Fount of Yak Knowledge

India
5509 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:

http://www.apexsql.com/sql_tools_log.asp


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

robvolk
Most Valuable Yak

USA
15657 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

Kristen
Test

United Kingdom
22403 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

Kristen
Go to Top of Page

Davidpoul
Starting Member

India
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
http://www.mssqldatabaserecovery.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000