How to resolve error while attach MDF file Error (5171)

  • 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

  • Hi,

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

    Regards

    Satyen

  • Restore from a full database backup

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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
  • 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/[/url]

    Thanks

  • 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

  • Please note: 2 year old thread.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    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

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply