我在我的一个客户系统中遇到了这个问题。 当我们通过SSMS连接到SQL Server 2008数据库引擎时,我收到错误
数据库' msdb'由于文件无法访问或无法打开 内存或磁盘空间不足。请参阅SQL Server错误日志 细节。 (Microsoft SQL Server,错误:945)
然后还连接到数据库。但客户数据库不可见。如果我试图扩展系统数据库'或者'安全'或者'管理'我又得到了这个错误。
硬盘有80 GB的可用空间,帐户有权限,.mdf和.ldf文件不是只读的
在SQL Server配置管理器中 - > SQL Server属性 - >登录为 - >已选择此帐户'并使用帐户名称' admin'和它的密码。
他们可以通过其他PC的应用程序进行数据操作。问题仅限于从SSMS访问。
在错误日志中我们可以看到
2016-08-10 18:02:56.17 spid13s Error: 824, Severity: 24, State: 2.
2016-08-10 18:02:56.17 spid13s SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x2411d175; actual: 0x2411dfd1). It occurred during a read of page (2:0) in database ID 4 at offset 0000000000000000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
2016-08-10 18:02:56.17 spid13s Error: 5105, Severity: 16, State: 1.
2016-08-10 18:02:56.17 spid13s A file activation error occurred. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
2016-08-10 18:02:56.17 spid13s File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf" may be incorrect.
2016-08-10 18:02:56.17 spid13s The log cannot be rebuilt because there were open transactions/users when the database was shutdown, no checkpoint occurred to the database, or the database was read-only. This error could occur if the transaction log file was manually deleted or lost due to a hardware or environment failure.
2016-08-10 18:02:56.17 spid36s Error: 945, Severity: 14, State: 2.
2016-08-10 18:02:56.17 spid36s Database 'msdb' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2016-08-10 18:02:56.17 spid36s Problems recording information in the msdb..suspect_pages table were encountered. This error does not interfere with any activity except maintenance of the suspect_pages table. Check the error log for more information.
请建议我如何纠正这个问题
答案 0 :(得分:1)
由于我的msdb文件已损坏且没有系统数据库备份,我必须重建MSDB数据库,幸运的是没有工作或警报等....我尝试了以下链接中的步骤 Rebuild System Databases
执行计划中只有一个更改是在instmsdb.sql重建MSDB的第6步。 由于发生错误,我在命令提示符下停止了SQL Server服务,并从Configuration Manager启动。 然后打开SSMS,连接到数据库引擎(我收到错误,点击确定),然后,从中打开instmsdb.sql C:\ Program Files \ Microsoft SQL Server \ MSSQL10.MSSQLSERVER \ MSSQL \ Install \ instmsdb.sql并执行。