Can somebody in this forum recommend a tool/procedure to repair or recover a corrupt SQL Server 2000 database file?
Can you attach the database (it may take a while)? Do you have both the MDF and LDF? Any errors in Event Log or SQL Server logs?
You can create an empty log file if the LDF is missing or corrupt, or run DBCC CHECKDB, and if there are still errors, run it again with REPAIR_ALLOW_DATA_LOSS (which, obviously, may lose data - but if you had a good backup, you probably wouldn't be asking this).
Obviously, these are last resort measures - you will almost certainly lose data this way. If your data has any value whatsoever, pick up the phone and spend the $249 to talk to MS Product Support.
The best articles I've seen for repairing database corruption are:
- Help, My Database Is Corrupt by Gail Shaw
- Misconceptions Around Database Repair by Paul Randal - Paul wrote the DBCC utility when he was working for Microsoft. In fact, his whole blog at SQLskills.com is pretty useful, especially the DBCC category.
I am fully satisfied with Mark. Run DBCC CHECKDB. If you need the tool than there are lots of sql repair tool is available as Stellar Phoenix SQL Database Recovery.
Corrupted sql server database mdf files can be repaired, in the following manner-
select ‘run’ from ‘start’ enter
‘cmd’ and then enter type “chkdsk
x: /r” and press enter key, here X represents drive where mdf file is
stored to confirm restore press “Y” restart system, the drive will be scanned at startup and the MDF file is recovered
if, these fails to works you may use third party my sql repair software.