【问题标题】:Database 'msdb' cannot be opened due to inaccessible files or insufficient memory or disk space由于文件不可访问或内存或磁盘空间不足,无法打开数据库“msdb”
【发布时间】:2016-08-11 00:42:22
【问题描述】:

我在我的一个客户系统中遇到了这个问题。 当我们通过 SSMS 连接到 SQL Server 2008 数据库引擎时,出现错误

由于文件不可访问或无法打开数据库“msdb”或 内存或磁盘空间不足。请参阅 SQL Server 错误日志以了解 细节。 (Microsoft SQL Server,错误:945)

然后也连接到数据库。但客户数据库不可见。如果我再次尝试扩展“系统数据库”或“安全”或“管理”,我会收到此错误。

硬盘有 80gb 可用空间,账户有权限,.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.

请建议我如何解决这个问题

【问题讨论】:

    标签: sql-server corrupt-data system-databases


    【解决方案1】:

    由于我的 msdb 文件已损坏并且没有系统数据库备份,我必须重建 MSDB 数据库,幸运的是没有作业或警报等....我尝试了以下链接中的步骤 Rebuild System Databases

    执行计划中只有一项更改发生在从 instmsdb.sql 重建 MSDB 的第 6 步。 由于发生错误,我在命令提示符处停止了 SQL Server 服务并从配置管理器启动。 然后打开 SSMS ,连接到数据库引擎(我得到一个错误,点击确定),然后,打开 instmsdb.sql 从 C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Install\instmsdb.sql 并执行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-17
      • 1970-01-01
      • 2014-10-11
      • 1970-01-01
      • 2014-06-26
      • 1970-01-01
      • 1970-01-01
      • 2012-06-14
      相关资源
      最近更新 更多