SQL database is crashed

SQL Server
Hello, Our server was hit by some unknown virus which seems to have corrupted header information for many of our files including an important databases and some of its backups. However the log file (.LDF) for the live DB was not affected. We also have a relatively old .BAK backup file. Is it possible to bring the DB (.MDF) in the old backup to Live standard using the new/latest Log file? If so, how? Any help is truly appreciated.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Follow the steps mentioned below:

* Take a tail log backup of your database after
your full backup

* Restore your Full backup available with you
using WITH NORECOVERY option.

* Restore Differential backups ( if you have in
order) WITH NORECOVERY option

* Restore Transactional log backup in order WITH
NORECOVERY and the last tail backup taken using WITH RECOVERY option..
Also have a look this Recommended actions


Discuss This Question: 5  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen
    No, only through .ldf file restoration is not possible. While you have backup (assuming a week long ago) it is possible. Open management studio > select database > attach and here select add .mdf and .ldf file and then click OK. However, version to version it may change.  For more info, please read this article: https://searchsecurity.techtarget.com/tip/Restoring-SQL-Server-databases-from-mdf-files
    142,370 pointsBadges:
  • Harisheldon

    In one short word, No. The log file is showing you what has occurred during the time of the incident or any other issues that may arise. It is not for the use of backing up data.

    Saying that, you should have been backing up your DB at least once a day, at a minimum by using a third party program, if, the program you are using does not come with a way to backup. This is simple, basic IT 101 common sense. Always backup your data, or, store your critical data on a separate hard drive that does not contain the DB program so that if, and when, it does crash, your data is still safe and sound.

    12,915 pointsBadges:
  • ToddN2000
    No. This goes to prove the issue of how critical backups and a good disaster recovery plan are. They should be done often and updated as needed.
    136,350 pointsBadges:
  • OliverButler
    I agree with all responses that it's impossible to restore db through only .ldf file. 
    105 pointsBadges:
  • OliverButler
    Did you solve the problem? just curious to know.
    105 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: