12.1" netbook released in September 2010. Powered by an Intel ATOM D525 dual core processor running at 1.8 Ghz and NVIDIA ION graphics processor.

2 个问题 查看全部

How to fix SQL database?

We have a legal program that uses SQL express 2005. Somehow the company is saying our database has become corrupted and needs to be sent to a company to be rebuilt or fixed. The database sits on an external hard drive. We had to reload windows on the machine that it sits on. when we tried to reattach the database afterwards, we couldn't. Is there a cheap or software out there that I can use to fix it?

已回答! View the answer 我也有这个问题

这是一个好问题吗?

按维修分数 1
添加一条评论
传播 Fixmas 欢乐
Get $12 off your purchase of $50 or more with code FIXMAS12
传播 Fixmas 欢乐
Get $12 off your purchase of $50 or more with code FIXMAS12

2个回答

已选择的解决方案

So you have only the .mdf and .ldf files?

The only thing left to try is:

1) take a copy of the ORIGINAL .mdf file (it's far better if it's the file as it looked BEFORE you attempted to attach it -- the attach attempt itself will modify the file)

2) if the db has only the one primary fg, attempt to do a "sp_attach_single_file_db" on the file.

If it has multiple fgs, primary and one or more secondaries, you will have to use CREATE DATABASE ... WITH ATTACH_REBUILD_LOG

For example, select "New Query" from withn Express, then issue this command:

EXEC sp_attach_single_file_db 'Db_Attach_Test',

'x:\path\to\primary\data\file\primarydatafile.mdf'

Of the programs I can recommend to you SQL Server Recovery Toolbox if the above suggestion don't help. I hope everything works out for you. http://www.oemailrecovery.com/sql_recove...

这个答案有帮助吗?

按维修分数 2

评论:

Also have a look this Recommended actions

http://itknowledgeexchange.techtarget.co...

添加一条评论

Execute the following query

ALTER DATABASE test

SET emergency

GO

ALTER DATABASE test

SET single_user

GO

DBCC checkdb (test, repair_allow_data_loss)

ALTER DATABASE test

SET multi_user

GO

BUT be careful: REPAIR_ALLOW_DATA_LOSS means that some data might be lost in the DB even if it attached successfully. If you want to recover your data without any loss then you must go with third party SQL MDF Recovery Tool

这个答案有帮助吗?

按维修分数 0
添加一条评论

添加你的答案

morrison 将永远感激不已
浏览统计数据:

过去的24小时: 0

过去的7天: 1

过去的30天: 1

总计 106