数据库置疑的解决方法

来源:互联网 发布:云天河姜云凡美工 编辑:程序博客网 时间:2024/04/28 20:30

备份后的数据如果是在置疑之后备份的恢复之后也是置疑的。  
 
数据库置疑之后,你可以查看系统数据库maseter中的sysdatabase中的status列,如果该列值是256表示置疑
 
 
你可以手工恢复
 
 
必须以sa登陆
 
  USE   master  
  GO  
  sp_configure   'allow   updates',   1  
  GO  
  RECONFIGURE   WITH   OVERRIDE  
  GO  
  sp_resetstatus    
  go  
   
  update   sysdatabase    
  set   status   =   status   -256  
  where   dbname="your   database   name   here"  
  and   status&256=   256(
或者直接写
256)  
  go  
  sp_configure   'allow   updates',   1  
  GO  
  RECONFIGURE   WITH   OVERRIDE  
  GO  
  sp_resetstatus    
  go  

原创粉丝点击