昨天因断电,数据库 "DatabaseName" 被标记为 [Suspect],被质疑了?
Search 后,以下方案最终解决了问题。
USE [master] GO ALTER DATABASE DataBaseName SET EMERGENCY; GO ALTER DATABASE DataBaseName SET SINGLE_USER; GO DBCC CHECKDB (DataBaseName, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS, ALL_ERRORMSGS; GO ALTER DATABASE DataBaseName SET MULTI_USER; GO ALTER DATABASE DataBaseName SET ONLINE; GO
Verson: SQL Server 2008 R2