SQL Server Express 2014

4 replies
Hello!
We have one program which uses SQL Server Express 2014. The database was on an external hard drive. Now with this drive having problems. Our bosses decided to give this external hard drive to a company which is engaged in repair and restoration.
We have rebooted Windows which were installed this database. Then we tried to attach our database which was restored from the hard disk, but we can't do anything. How can I restore this database or attach it to make it work?
#2014 #express #server #sql
  • Profile picture of the author tobypaul509
    guys have any ideas on my question?
    {{ DiscussionBoard.errors[10994243].message }}
  • Profile picture of the author GabrielPoulsen
    So you have only the .mdf and .ldf files?
    The only thing left to try is:

    1) take a copy of the ORIGINAL .mdf file (it's far better if it's the file as it looked BEFORE you attempted to attach it -- the attach attempt itself will modify the file)

    2) if the db has only the one primary fg, attempt to do a "sp_attach_single_file_db" on the file.
    If it has multiple fgs, primary and one or more secondaries, you will have to use CREATE DATABASE ... WITH ATTACH_REBUILD_LOG

    For example, select "New Query" from withn Express, then issue this command:

    EXEC sp_attach_single_file_db 'Db_Attach_Test',
    'x:\path\to\primary\data\file\primarydatafile.mdf'
    {{ DiscussionBoard.errors[10994537].message }}
  • Profile picture of the author GabrielPoulsen
    Of the programs I can recommend to you SQL Server Recovery Toolbox for recovery MDF if the above suggestion don't help. I hope everything works out for you.
    http://www.oemailrecovery.com/sql_recovery.html
    {{ DiscussionBoard.errors[10994538].message }}
    • Profile picture of the author tobypaul509
      Thanks for the advice. Your link was very useful for me! Thank you!
      {{ DiscussionBoard.errors[10994583].message }}

Trending Topics