数据库置疑心得

1.数据库备份
2.执行下面语句
use master  
go  
sp_configure 'allow updates',1 reconfigure with override  
go  
update sysdatabases set status =32768 where name='置疑的数据库名' 
go  
sp_dboption '置疑的数据库名', 'single user', 'true' 
go  
dbcc checkdb('置疑的数据库名')   
go  
update sysdatabases set status =28 where name='置疑的数据库名' 
go  
sp_configure 'allow updates', 0 reconfigure with override  
go   
sp_dboption '置疑的数据库名', 'single user', 'false' 
go 
3.重启数据库
4.新建数据库与置疑数据库同名
5.用原数据库替换新建数据库
6.附加数据库
posted @ 2011-05-23 22:25  a1746172  阅读(173)  评论(0)    收藏  举报