.mdf file currupt

  • Hi , i am facing one issue with attaching .mdf file created in

    sql 2000 server. At teh time of attaching it is showing error

    " microsoft sql server error: 5171. Unfortunately i dont have the backup of this database, at the time when it got suspected mode. Kindly provide some solution

  • was the database dettached properly before its being attached?

    ----------
    Ashish

  • What's the full error message? (I don't memorise error numbers)

    Do note, there may not be a solution here, depending how bad the corruption is. I'll help as much as I can.

    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
  • Can you update the full error

    M&M

  • it was showing suspect mode. When i restart the server database was not in the database tree

  • What is the full error message you get trying to attach it?

    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
  • If you have anyone there helping you, task them immediately with getting your backups prepared for a restore operation. You might not be able to recover this, so you'll need to go your backups.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • when i tried to attach the .mdf file it is showing the error c:\ [the path]\solarwinds_data.mdf is not a primary database file , (microsoft SQL Server , error : 5171

    solarwinds_data is my database file

  • sourav_1002001 (2/2/2011)


    when i tried to attach the .mdf file it is showing the error c:\ [the path]\solarwinds_data.mdf is not a primary database file ,

    As far as I know, that implies that the file headers are damaged to the point that SQL can't even tell that this is a database. If that is the case, this is not repairable in any way and you're not going to get that DB back.

    I'll get a second opinion if you like.

    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
  • Grant Fritchey (2/2/2011)


    If you have anyone there helping you, task them immediately with getting your backups prepared for a restore operation.

    Backups? What are backups?

    sourav_1002001 (2/2/2011)


    Unfortunately i dont have the backup of this database, at the time when it got suspected mode.

    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
  • thanks for the post. Is that got currupt due to bad sector of HDD, because i have recovered this data file from a damaged HDD. So is there any hope of getting the database back. how ever i have the log file available if that helps????

  • If the file headers are damaged, no.

    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
  • GilaMonster (2/2/2011)


    Grant Fritchey (2/2/2011)


    If you have anyone there helping you, task them immediately with getting your backups prepared for a restore operation.

    Backups? What are backups?

    sourav_1002001 (2/2/2011)


    Unfortunately i dont have the backup of this database, at the time when it got suspected mode.

    Great googly moogly.

    Hopefully the resume is up to date.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • sourav_1002001 (2/2/2011)


    thanks for the post. Is that got currupt due to bad sector of HDD, because i have recovered this data file from a damaged HDD. So is there any hope of getting the database back. how ever i have the log file available if that helps????

    Nah, Grant, he's relatively safe, I think. This is hardware failure and before his time (I hope).

    The log can't work without the mdf file, unfortunately. It's dead weight until you get the mdf up and running in some form. I know better than to dispute anything Gail has to say about bad database recovery unless I'm damned sure. 🙂

    However, is it possible there were network backups of the drives taken, like ghost snapshots of the RAID filesystem? I realize you never did a direct SQL backup, but was a network/windows backup ever taken of these drives?


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 14 posts - 1 through 13 (of 13 total)

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