我在我的一个客户系统中面临这个问题。当我们通过 SSMS 连接到 SQL Server 2008 数据库引擎时,出现错误
由于文件不可访问或内存或磁盘空间不足,无法打开数据库“msdb”。有关详细信息,请参阅 SQL Server 错误日志。(Microsoft SQL Server,错误:945)
然后也连接到数据库。但客户数据库不可见。如果我再次尝试扩展“系统数据库”或“安全”或“管理”,我会收到此错误。
硬盘有 80 GB 可用空间,帐户有权限,.mdf 和 .ldf 文件不是只读的
在 SQL Server 配置管理器 -> SQL Server 属性 -> 登录身份 -> 选择“此帐户”并使用帐户名“管理员”及其密码。
他们能够通过其他 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.
请建议我如何解决这个问题