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
 
源地址:http://www.cnblogs.com/sonicit/archive/2007/07/09/811696.html
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
 
源地址:http://www.cnblogs.com/sonicit/archive/2007/07/09/811696.html

相关文章:

  • 2022-12-23
  • 2021-10-29
  • 2021-08-12
  • 2021-12-15
  • 2021-08-18
  • 2021-05-27
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2021-11-19
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-07-14
  • 2021-12-09
相关资源
相似解决方案