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

相关文章:

  • 2022-12-23
  • 2021-08-03
  • 2021-09-11
  • 2022-12-23
  • 2021-07-12
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2021-10-29
  • 2021-12-22
  • 2021-08-04
  • 2022-02-24
  • 2021-07-23
相关资源
相似解决方案