0
Q:
Recovering .mdf and .ldf files from SQL Server
I backed-up our SQL Server yesterday around noon, and we then added more data in. Today, when we tried to start our application, we found that the database is in SUSPEND mode. We stopped our SQL services and tried to copy the newer data, but there was a data error. It seems that our .mdf file is corrupted. Is it possible to recover the data from the corrupted .mdf file, or our current .ldf file? It will take several days if we give the information over for file recovery.
ASKED: Jul 8 2008  7:34 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
47070 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
It depends on the state of the database corruption as to how much data you will be able to recover.

Is this SQL 2000 or SQL 2005? If it's SQL 2005 you can do an ALTER DATABASE command and set the database into Emergency mode which will allow you to query as much data as possible. Can you post the exact error message that you are getting?

You can also try doing a DBCC CHECKDB of the database and try and fix the problem.

Is your database in full recovery mode or simple recovery mode? If you are in full recovery mode, and you can fix the database via DBCC CHECKDB you can try to backup the log and then restore the full backup, then roll the log forward until just after the data addition was completed.
Last Answered: Jul 9 2008  6:43 AM GMT by Mrdenny   47070 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Mrdenny   47070 pts.  |   Jul 9 2008  6:44AM GMT

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 
0