原文出处:http://bbs.smartsoft.cn/forum.php?mod=viewthread&tid=231&extra=page%3D1
USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
ALTER DATABASE [数据库] SET EMERGENCY
GO
ALTER DATABASE
[数据库] SET SINGLE_USER
GO
DBCC CHECKDB([数据库], REPAIR_ALLOW_DATA_LOSS)
DBCC CHECKDB([数据库], REPAIR_REBUILD)
GO
EXEC sp_dboption
[数据库], N'single', N'false'
GO
ALTER DATABASE
[数据库] SET ONLINE
GO
SP_CONFIGURE 'allow updates', 0 RECONFIGURE WITH OVERRIDE
Go