生产服务器出现 I/O 磁盘错误,我尝试使用 dbcc 修复它,但它出现意外错误并在几分钟后崩溃。所以我把文件拿下来,把它复制到一台新机器上。
我没有最近可用的快速备份,(它是一个需要很长时间才能下载的在线备份)。
File activation failure. The physical file name "c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mydb_log.LDF" may be incorrect.
The log cannot be rebuilt because the database was not cleanly shut down.
DBCC results for 'mydb'.
Msg 824, Level 24, State 2, Line 1
SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:3724880; actual 0:0). It occurred during a read of page (1:3724880) in database ID 5 at offset 0x0000071aca0000 in file '\mydb.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
The emergency-mode repair failed.You must restore from backup.
答案是——正如你们中的许多人在评论中回答的那样——没有办法绕过备份是唯一的出路。我确实找到了一个很好的备份并且它被恢复了。为大家提供帮助。