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'