How to restore crashed MSSQL server from old mdf ldf files in hand? Print

  • 0

Okay, this is a bit tricky and manual, but here are the steps you can follow if you have installed the same mssql server version, and then try to attach your old MDF ldf so that you can run the server with the same DB status as in MDF ldf files in your hand.

  1. Create the same named db in MSSQL - we will recommend creating them via Plesk Panel only so everything in within Plesk
  2. Now locate your mssql data folder where it creates those mdf ldf files as in the name of the database you just created, and pick those newly created db's mdf and ldf file names from there.
  3. Now locate your old mssql data folder where the old mssql data backup of mdf ldf file is there and locate a similar looking file name of that old db and have those old mdf ldf == new mdf ldf which you just recorded in step 2 above.
  4. Now stop the mssql server for a while and copy those mdf ldf from old sql data folder to new current sql data folder and overwrite the files of newly created db with this same named mdf ldf file.
  5. Now start back the mssql server. Now if you face any error it can be a mismatch of SQL Server version, so mdf ldf may only work if your old mssql version xxx.xxxx and the new version xxx.xxxxx is same.

 

Once done for one database, the same step needs to be done for other dbs in the same way.

If you have a managed server, then create all required dbs with the same old name in the Plesk panel, and update our team. Our team can help you with this above-mentioned manual process, but their role only comes when you create the same-named empty db via Plesk panel at least and inform them for the help of MDF ldf migration to the new SQL data folder, as mentioned in this article.


Was this answer helpful?

« Back