SQL2005数据库变成"可疑"的解决方法

DBName为数据库名

USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
ALTER DATABASE DBName SET EMERGENCY
GO
sp_dboption 'DBName', 'single user', 'true'
GO
DBCC CHECKDB('DBName','REPAIR_ALLOW_DATA_LOSS')
GO
ALTER DATABASE DBName SET ONLINE
GO
sp_configure 'allow updates', 0 reconfigure with override
GO
sp_dboption 'DBName', 'single user', 'false'
GO

你可能感兴趣的:(SQL Server)