MSSQL出现的823错误

来源:互联网 发布:linux内核 文件系统 编辑:程序博客网 时间:2024/05/18 01:09

据排查是数据库日志文件发生坏损。需要先删除坏损日志,然后在查询分析器中运行如下命令来重建日志:

use master
go

sp_configure 'allow updates',1
go

reconfigure with override
go

update sysdatabases set status=-32768 where dbid=DB_ID('test')
go

dbcc rebuild_log('test','D:/Program Files/Microsoft SQL Server/MSSQL/Data/test_log.ldf')
go

sp_dboption 'test','dbo use only','false'
go

sp_configure 'allow updates',0
go

reconfigure with override
go

原创粉丝点击