DBCC CheckDB 遇到早期硬件故障

Hom*_*mer 7 sql-server sql-server-2008-r2 dbcc-checkdb

自 6 月下旬以来,我们的生产数据库服务器(Windows Server 2008 R2 DC 上的 SQL 2008 R2 Enterprise)在其夜间 DBCC CheckDB (Prod_DB) 期间遇到了一个奇怪的错误。那时,同样的工作一直运行良好。

我已将完整备份从该服务器恢复到测试服务器,数据文件似乎没问题,DBCC CheckDB 在那里没有返回任何错误。

我上周应用了这个修补程序,但没有解决问题。

https://support.microsoft.com/en-us/kb/967351/en-us

该消息听起来很严重,但是,应用程序在其他方面正常运行。所以我不确定我在这里吃的是什么。

如果有人可以分享任何建议,将不胜感激。

以下是来自 SQL 代理作业历史记录的错误消息:

Date                      7/28/2015 4:02:00 AM
Log                         Job History (DBCC Check DBs)

Step ID                 1
Server                   XXX
Job Name                            DBCC Check DBs
Step Name                         check dbs
Duration                              00:12:37
Sql Severity        17
Sql Message ID 823
Operator Emailed            
Operator Net sent           
Operator Paged                
Retries Attempted          0

Message
Executed as user: XXX. During undoing of a logged operation in database 

'Prod_DB', an error occurred at log record ID (21235:2462484:113). 
Typically, the specific failure is logged previously as an error in the Windows Event Log service. Restore the database or file from a backup, or repair the database. 
[SQLSTATE 42000] (Error 3314)  A database snapshot cannot be created because it failed to start. 
[SQLSTATE 42000] (Error 1823)  A database snapshot cannot be created because it failed to start. 
[SQLSTATE 42000] (Error 1823)  The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline. 
[SQLSTATE 42000] (Error 7928)  The database could not be exclusively locked to perform the operation. 
[SQLSTATE 42000] (Error 5030)  Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details. 
[SQLSTATE 42000] (Error 7926)  The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x00001a68024000 in file 'M:\Datab\Prod_DB.mdf:MSSQL_DBCC9'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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. 
[SQLSTATE 01000] (Error 823)  The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x00002fd543e000 in file 'M:\Datab\Prod_DB.mdf:MSSQL_DBCC9'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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. 
[SQLSTATE 01000] (Error 823).  The step failed.
Run Code Online (Sandbox Code Playgroud)

Jam*_*oat 1

当您第一次启动时,DBCC CHECKDB它将创建一个数据库快照,以允许数据库在此过程中保持在线。如果您遇到问题,可以查看以下一些内容:

  1. 对 NTFS 系统进行碎片整理,存在一个问题:如果 NTFS 存储碎片严重,则 SQL Server 将不允许创建数据库快照。这是因为快照只能包含一定数量的碎片。微软支持中心在针对数据库数据文件报告的操作系统错误 1450 和 665 中对此进行了记录。(我相信你的问题就在这里)
  2. 检查是否有人更新了 NTFS 筛选器驱动程序,因为备用筛选器流可能存在问题。

此外,您始终可以尝试在 NTFS 碎片较少的部分上创建数据库的数据库快照并CHECKDB在那里运行。