How can I attach a recovered database in SQL Server?

Shahti S August 22, 2014
Pinterest Stumbleupon Whatsapp
Ads by Google

Respected Sir,

Unfortunately hard disk of my system is damaged. Now I recovered my database. but it cannot be attached again to SQL management studio 2005. The error is myfile.mdf is not a primary database file. (SQL server, error 5171)

Please sir help me.

  1. Bruce E
    August 22, 2014 at 5:27 am

    Your database file's header is corrupt. You will need to restore from your latest full backup.