Corruption in SQL server database can happen due to any uncertain like virus attack, power failure, hardware issue, OS malfunction, sudden system shutdown, so on. When a SQL server data file (.mdf) is corrupt then DBAs can try several methods to repair and recover data from it.
1. Run DBCC CHECKDB: It checks & reports all the error message in errorlog, if there is any problem with the database. Try to analyze & understand the error message logged in the errorlog. Re-run DBCC CHECKDB with the recommended minimum repair option to repair the file.
Detailed information about DBCC CHECKDB is available here: http://msdn.microsoft.com/en-us/lib...76064.aspx
2. Restore from backup: If above command fails to fix the error message the try to restore the database from clean backup.
3. 3rd party tool: Try 3rd party SQL server database recovery program to recover data from corrupt mdf file. Most of the software have demo version that shows the preview of corrupt SQL server data file. http://www.mssqldatabaserecovery.com/