Recovering a SQL Server 2005 Database from a Corrupt .mdf

  • I've searched around and to no avail have found a solution. Before I drop the $$$ on M$ support, I would like some advice from fellow EE experts.

    Situation:

    -Working SQL server directory was deleted, no backups of said directory or full database backups (oh joy!),

    -Recovered the .mdf files via file recovery software. They appear to be in tact but so far I've had no luck with a few .mdf recovery programs,

    -It's imperative that all avenues of recovery are attempted to get the data back (even if that requires $$$$$$$).

    Any advice? Has anyone been in this situation before with any luck using M$ support? Or maybe a different company?

    Please spare me the "Death Wish Maintenance Plan", "Should have had nightly backups" mumbo jumbo because yes, I too feel this situation could have been avoided but I was called in after the fact to help rectify the problem.

    Thanks.

  • To start, Microsoft support won't help you. They don't do data recovery, they're not allowed to try.

    You're probably out of luck.

    What happens when you try to attach the database to an instance?

    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’d try the procedure described below or third party tool such as

    Recovery Toolbox for SQL Server https://repairsql.recoverytoolbox.com/[/url]

    If that doesn’t work and database is severely corrupted.

    There might be other options out there. This is something that worked for me once but there are no guarantees that it will work at all

    times.

    Stop SQL Server instance

    -> Copy MDF and LDF files to another location

    -> Delete original MDF and LDF files

    -> Start SQL Server instance again

    -> Create new database with exact same name and file names

    -> Stop SQL Server

    -> overwrite newly created MDF and LDF.

    After this your database should be back online. If it is then go ahead and put it into EMERGANCY mode and SINGLE USER mode.

    Finally go ahead and execute DBCC CHECKDB like this DBCC CHECKDB (databaseName, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS

    If you can get to this and execute last command successfully you should be good. If not then your only options are restoring from backup and/or using third party tool.

Viewing 3 posts - 1 through 2 (of 2 total)

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