Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to resolve error while attach MDF file Error (5171) Expand / Collapse
Author
Message
Posted Friday, November 2, 2012 9:48 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Sunday, June 22, 2014 9:45 PM
Points: 422, Visits: 92
While i try to attach the mdf file i got the error,

The Error is: DatabaseName.mdf is not SQL Server Database Primary Data File

The SQL server Error No. 5171
Post #1380469
Posted Friday, November 2, 2012 11:12 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 9:46 AM
Points: 25, Visits: 145
Hi,

It could be corrupted. Try restoring from a full backup.

Regards
Satyen
Post #1380520
Posted Saturday, November 3, 2012 2:16 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:15 PM
Points: 43,017, Visits: 36,179
Restore from a full database backup


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1380677
Posted Sunday, November 25, 2012 11:18 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, December 5, 2012 12:06 AM
Points: 4, Visits: 3
I found this website on the Google would be work for you. This website offering a free trial version of software, in trial version you can see the preview of recovered data.
http://www.repairsqlserver.net/

Thanks
Post #1388436
Posted Saturday, May 10, 2014 2:26 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, September 8, 2014 7:00 AM
Points: 25, Visits: 41
If you persist error while attaching SQL MDF File that mean the MDF file is corrupted you need to restore it from full backup or use any SQL recovery application which provides to export MDF file directly to the SQL Server

SSMS Expert
Post #1569498
Posted Saturday, May 10, 2014 3:31 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:15 PM
Points: 43,017, Visits: 36,179
Please note: 2 year old thread.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1569502
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse