Server Crashed,Need to Get SQL Dbs Back from Hard Drive.

  • Hi All,

    One of our server crashed today,we are told that the problem id with Hard Drive and we cannot boot the server with it.We are assured the the data can be backedup from the burnt hard drive.

    My question is can we copy all the files from "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA" and restore the database on some other server?.

    We have backups from sql backups from old server (before the HD was corrupted burnt damaged) but they are too old for us to work.

    So can we use the MDF,LDF files from "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA" to actually restore our databases to a new server?

    Thanks and Regards

    Ravi T

  • if you have both mdf and ldf files then you can attempt attaching the mdf and ldf files. The attaching process is fairly simple and can be done though GUI after the files are copied

    This will save you a lot of time as restoration from database backups (.bak) may take relatively more time.

    But you should ideally use the files which are latest even if it means that you have to go through the restore process from possibly available backups(.bak).

  • Not to put salt on the open wound, but this shows the importance of a good backup strategy.

    I used Linux recovery distros for that. If you can attach an external drive or disk array, you boot up the system and then you copy the mdf and ldf files.

    On a different server, just attach each database using the files you recovery.

    Take a look on this link, which shows some of those useful Linux distros:

    http://www.techrepublic.com/blog/10things/10-linux-rescue-tools-for-recovering-linux-windows-or-mac-machines/1458

  • Copy the mdf and ldf files (and ndf if there are any), attach the databases they should attach OK, but there's no guarantees they will.

    Why do important databases have no backups?

    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
  • Make sure you copy and don't move the files. Easy to make this mistake and have things fail.

    Right click, drag, and copy.

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

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