3 Replies - 5198 Views - Last Post: 15 August 2012 - 05:29 AM Rate Topic: -----

#1 Thinus du Pisanie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 107
  • Joined: 07-October 11

How to recover .ldf files

Posted 06 July 2012 - 04:11 AM

People I have urgent quistion please assist.

Our IT deleted a database of SQL R2 and we don't have a backup of the database.

What I do have is the .ldf file that mybe consist of the latest data idon't know.

I want to ask how do I recover this .ldf file in SQL to see if it can restore the databse.

Please Assist.
Is This A Good Question/Topic? 0
  • +

Replies To: How to recover .ldf files

#2 Astalor  Icon User is offline

  • New D.I.C Head

Reputation: 7
  • View blog
  • Posts: 22
  • Joined: 17-July 12

Re: How to recover .ldf files

Posted 17 July 2012 - 03:57 AM

An LDF file for a database really just holds transaction data and no real data that you would be able to use to restore lost information, to the best of my knowledge.
Was This Post Helpful? 0
  • +
  • -

#3 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 591
  • View blog
  • Posts: 1,318
  • Joined: 24-April 12

Re: How to recover .ldf files

Posted 22 July 2012 - 03:21 PM

Actually, the .LDF is the critical file. You can lose a .MDF file and not lose one single piece of data right down to the microsecond that the server crashed, if you have the .LDF.

However, I hate to break this to you. There's nothing that can be done if you don't have backups.

In order to use the .LDF file you can restore your full backup. Then restore any incremental backups. Then restore any transaction log backups you have. This will roll you forward in time to the point of the last transaction log backup, which "could" be a long time before the server crashed. That could be hours of critical data that simply is not in any of your backups anywhere.

If you have the .MDF and no .LDF. Some of that data (transactions that need to roll forward but are lost) is gone forever with whatever that means for your company. For some companies no big deal, but for others this could mean bankruptcy.

If however, you have the .LDF file you can recover everything up to the final seconds of the crash.

You do this by applying the .LDF after the last transaction log backup is restored.

But you can only do this if you have the backup set that takes you up to the point of the last backup.

I regret to be the one to inform you of this, but the data is gone forever.

This is why it is absolutely critical to perform regular backups and run fire drills. (Fire drills are where you take your backups and restore them to a test server to verify that the backups are good as well as to keep your team trained that they know how to restore the database quickly in the event of a disaster. It's the only way to know whether your backups are any good.)

This post has been edited by BBeck: 22 July 2012 - 03:24 PM

Was This Post Helpful? 2
  • +
  • -

#4 Thinus du Pisanie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 107
  • Joined: 07-October 11

Re: How to recover .ldf files

Posted 15 August 2012 - 05:29 AM

Thanks for the information won't let it happen again.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1