DB Restore

  • Hi,

    My MDF is corropted and its not accessible. I have a backup which is 8 hrs old. Now i have restored this backup and its working fine. However there is some data missing since it is 8 hrs. old. I have the latest .LDF file intact. Can I use this LDF to get back all the latest data? Please help me with this.

    Thanks and Regards,

    Praveen Iyer

  • No, for a few reasons.

    1. You've already restored the data file and did not leave the database in a state to restore additional log files (so I assume).

    2. The LDF is not a log backup, rather it is the log file and you can not restore from the log file.

    3. You could perhaps use a 3rd-party log file reader and restore from the log file in that manner, but the point is moot if your users are already back in the database. You'd need to restore the data file, read the logs in with the third-party tool up until the point of failure, and then let the users in.

    Did you have a valid data backup and series of log backups that spanned the 8 hours? If so I suggest restoring the data backup, leaving the database in recovery mode, and then applying the log backups up to the point of failure if you know when the corruption occured.

    - Tim

    - Tim Ford, SQL Server MVPhttp://www.sqlcruise.comhttp://www.thesqlagentman.com http://www.linkedin.com/in/timothyford

  • One more tip here...

    A user database found bad/corrupted, but the transaction log file of the database is still available in good state, you can still back up the last active transaction log of the database to reduce the loss of data.

    Refer "backup log" topic in BOL.

    If you have Full, Differential and Tlog backup in place and if you take the Tlog backup after corrouption a user database then there are very less chances or loss of user data. If you are sure about the corruption time then you can restore the data upto a specific time.

    Refer "restore log" topic on BOL <> STOPAT = { date_time | @date_time_var } .

    Good luck...

    warmest

    Jay.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply