corruption mdf header corrupted

Hi All,

Is there any way if mdf file header is corrupted. Can we extracted data from it. Is there any workaround to pull out data,.

Had it been a log file header corruption at least we can rebuilt the log. But i see a mdf itself is corrupted and there is no backups available of one my clients. I dont knw how they are maintaining those database. The database size is 45 Gigs. There are in RTM sql 2005. Its nasty.

Out of my curosity, i just wanted to know is there any any way can we fetch data and load it a temp database atleast.

Error: 5172, Severity: 16, State: 15.

The header for file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\dbname.mdf' is not a valid database file header. The PageAudit property is incorrect.

Any suggestions will be great help.

Thanks in Advance.

August 11th, 2012 1:32am

Hi Manu,

I suggest that you go through the these excellent articles from Paul on database corruption  -http://sqlskills.com/BLOGS/PAUL/category/Corruption.aspx

Hope this helps!

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 4:26pm

Typically, your best course of action is to restore from backup when you have severe database corruption.  Out of curiousity, are you able to to get any file information using the undocumented dbcc commands below?

DBCC CHECKPRIMARYFILE(N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\dbname.mdf',0); --IsMDF
DBCC CHECKPRIMARYFILE(N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\dbname.mdf',2); --Database name, Database version, Collation
DBCC CHECKPRIMARYFILE(N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\dbname.mdf',3); --status, fileid, name, file name

August 11th, 2012 5:12pm

to recovery data from a mdf file you can use http://www.sqlrecoverytool.com/

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2012 6:57pm

Hi Manu,

You can try Stellar Phoenix SQL Database Repair tool to repair it.

June 4th, 2015 1:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics