时间:2021-07-01 10:21:17 帮助过:31人阅读
alter database dcdata set single_user with rollback immediate
设置为单用户模式
然后执行修复.
DBCC CHECKTABLE(ZLBZSGPH,REPAIR_ALLOW_DATA_LOSS )
DBCC CHECKTABLE(ZLBZSGPB,REPAIR_ALLOW_DATA_LOSS )
DBCC CHECKTABLE(ZLYGGPMXh,REPAIR_ALLOW_DATA_LOSS )
DBCC CHECKTABLE(ZLYGGPMXB,REPAIR_ALLOW_DATA_LOSS )
会出现修复信息.
然后在用系统的存储过程取消单用户模式
exec sp_dboption 'dcdata', 'single user', false
exec sp_dboption @dbname=‘dcdata‘,@optname=‘single user‘,@optvalue=‘true‘
exec sp_dboption @dbname=‘dcdata‘,@optname=‘single user‘,@optvalue=‘false‘
SQL 修复表
标签:with ble base set dbcc back false 设置 iat