-- 解决方法:
--
-- 分离出还原失败的数据库Geb
-- 先创建一个同样的数据库Geb
-- 停掉server服务,用旧的数据文件覆盖新创建的文件(只要mdf就可以)。
-- 启动server服务
-- 运行以下命令
sp_configure 'allow',1
go
reconfigure with override
go
update sysdatabases set status=32768 where name='hrdb'
go
dbcc rebuild_log('hrdb','D:/Kayang/database/hrdb_Log.ldf')
go
update sysdatabases set status=0 where name='hrdb'
go
sp_configure 'allow',0
go
reconfigure with override
go
dbcc checkdb('hrdb')
--若发现有错误,还要进一步找出出错的地方,可以先检查
-- DBCC CHECKTABLE (sysobjects)
-- DBCC CHECKTABLE (sysindexes)
-- DBCC CHECKTABLE (syscolumns )
-- DBCC CHECKTABLE (systypes)
--select * from sysdatabases
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/htl258/archive/2009/03/08/3969718.aspx