Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

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.

Bruce E
2014-08-22 05:27:35
Your database file's header is corrupt. You will need to restore from your latest full backup.