日期:2014-05-19  浏览次数:20533 次

如何用.MDF,.LDF文件恢复数据库
我直接建了一个同样的数据库,用这两个文件覆盖,但数据库又显示置疑状态,请问如何解决呢??

------解决方案--------------------
这个你只能紧急救援了,我以前也遇到过同样的问题,这个是微软发给我的帮助,希望对你有帮助
Dear Customer,

Thank you for contacting Microsoft SQL Server Support. Please follow the below steps to try to resolve this problem:

1. Create a new database with the same name as the corrupt database on a new SQL Server.

2. Stop the SQL Server Service, copy the problematic mdf file to replace the new mdf file.

3. Restart SQL Server service and now the database will be marked suspect.

4. Now we need to set the database to emergency mode. Please follow the below steps:

a. Run the following script in the Query Analyzer to enable update to the system tables:

sp_configure 'allow ',1

go

reconfigure with override

go

b. Update the sysdatabases table in the master database, set the status to 0 for the suspect database:

update master..sysdatabases set status = 32768 where name = 'your suspect database name '

c. Now stop and restart the MSSQLServer service. After we restart the service, the database is in emergency mode. If we can access the database, please use DTS, BCP or select…into… to export the data to a new database.

If you have further question on this problem, please feel free to let me know.

Best Regards,

Joe Li
Microsoft SQL Server Support Engineer
Email: v-qiaoli@mssupport.microsoft.com
Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to email our Managers at prcfb@microsoft.com. You can also contact my manager, Felix Feng by sending email v-fefeng@mssupport.microsoft.com
------解决方案--------------------
哈哈,楼主已处理了该问题,很简单:装上MSSQL2005问题解决.