usemaster
go
sp_configureallow,1
reconfigurewithoverride
go
updatesysdatabasessetstatus=32768wherename=置疑数据库名
go
--先删除之前的日记文件
DBCCREBUILD_LOG(置疑数据库名,置疑数据库日记文件寄存地位)
go
updatesysdatabasessetstatus=0wherename=置疑数据库名
--实行
restoredatabaseprojectWITHRECOVERY
go
sp_configureallow,0
reconfigurewithoverride
go
DBCCCHECKDB(置疑数据库名)--看看有无毛病
或
USEMASTER
GO
SP_CONFIGUREALLOWUPDATES,1RECONFIGUREWITHOVERRIDE
GO
UPDATESYSDATABASESSETSTATUS=32768WHERENAME=置疑的数据库名
Go
sp_dboption置疑的数据库名,singleuser,true
Go
DBCCCHECKDB(置疑的数据库名)
Go
updatesysdatabasessetstatus=28wherename=置疑的数据库名
Go
sp_configureallowupdates,0reconfigurewithoverride
Go