March 1, 2007 at 1:34 am
Due to some disaster my database server crashes. It starting but one database has been corrupted as is is not accessible from SQL Server or from other. Is there any way to restore some portion of the database.
I have the MDF file but not the LOG file
March 1, 2007 at 6:33 am
You might search the web on sp_attach_single_file_db. Make sure you have it backed up first.
March 1, 2007 at 9:43 pm
March 1, 2007 at 10:35 pm
You can try using dbcc rubuild_log which is undocumented...
Here is the example of it...
MohammedU
Microsoft SQL Server MVP
March 2, 2007 at 8:13 am
Unless it is a read only type of database, whatever uncommited transactions you might have had in the log file(s) are gone.
You can try creating a new database with the same name, same files name, detach it, replace the mdf with the original mdf, then attach back the database.
If it works, you will have to deal with the corruption later.
March 2, 2007 at 12:51 pm
You could put the database in emergency mode to copy readable data.
In SQL2000 you do this ( http://www.devx.com/vb2themax/Tip/18624 ) :
update sysdatabases
set status = status | -32768
where name = 'MioSuspectDatabase'
In SQL2005:
ALTER DATABASE [dbname] SET EMERGENCY
Once in emergency mode you could read the data and copy to a new database.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply