SQL SERVER 2005 数据库状态为“可疑”的解决方法

--MyDB为修复的数据名
USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
ALTER DATABASE MyDB SET EMERGENCY
GO
sp_dboption 'MyDB', 'single user', 'true'
GO
DBCC CHECKDB('MyDB','REPAIR_ALLOW_DATA_LOSS')
GO
ALTER DATABASE MyDB SET ONLINE
GO
sp_configure 'allow updates', 0 reconfigure with override
GO
sp_dboption 'MyDB', 'single user', 'false'
GO
posted @ 2007-07-09 20:15  sonicit  阅读(23044)  评论(23编辑  收藏  举报