How to apply transaction log from physical file to restored DB?

  • The .mdf file rendered 0kb after storage error. Older backup was restored , but the transaction log is available as a file from the production server. How to restore the updates from the tran file?

  • The answer to that was to take a tail-log backup before you restored over the damaged database....

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • It was a different team - Storage people working, I am given only the .log file.

    What are the chances now?.

  • Maybe possible, maybe not.

    You'll need to hack the database back into the server (google for hack attach Paul Randal)

    Then, if that's successful, you'll need to see if you can take a tail log backup. Requires that the database was in full recovery with an unbroken log chain at the time of the disaster.

    Then you'll probably have to restore the database again, leaving it in the RECOVERING state, then apply all log backups that were taken between when the full backup you used was taken and the time of the disaster. If any are missing or if there was any break in the log chain you won't be able to restore.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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