DBCC CHECKDB 遭遇Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered

本文涉及的产品
RDS SQL Server Serverless,2-4RCU 50GB 3个月
推荐场景:
云数据库 RDS SQL Server,基础系列 2核4GB
简介: 我们一个SQL Server服务器在执行YourSQLDBa的作业YourSQLDba_FullBackups_And_Maintenance时遇到了错误:   Exec YourSQLDba.Maint.

我们一个SQL Server服务器在执行YourSQLDBa的作业YourSQLDba_FullBackups_And_Maintenance时遇到了错误:

 

Exec YourSQLDba.Maint.ShowHistoryErrors @JobNo = 1227

<row>

<ctx>yMaint.IntegrityTesting</ctx>

<Sql>DBCC checkDb('xxxx') </Sql>

<err>In case of non-completion of this command check SQLServer Error Log at 2016-11-17 00:00:03.327 for Spid 67</err>

</row>

 

错误日志里面有下面一些错误信息,如下所示:

 

Date 2016/11/17 0:53:21
Log SQL Server (Archive #8 - 2016/11/18 0:00:00)
 
Source spid67
 
Message
DBCC CHECKDB (xxxx) executed by xxxxx found 0 errors and repaired 0 errors. Elapsed time: 0 hours 53 minutes 18 seconds. Internal database snapshot has split point LSN = 00623e60:00004a5b:0001 and first LSN = 00623e60:000048f3:0011. This is an informational message only. No user action is required.
 
Date 2016/11/17 0:53:21
Log SQL Server (Archive #8 - 2016/11/18 0:00:00)
 
Source spid13s
 
Message
Write to sparse file 'xxxxxxx.ndf:MSSQL_DBCC10' failed due to lack of disk space.
 
 
SQL Server
Date 2016/11/17 0:53:21
Log SQL Server (Archive #8 - 2016/11/18 0:00:00)
 
Source spid129
 
Message
D:\xxx\xxxx\xxxxx.ndf:MSSQL_DBCC10: Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered.

image

 

另外,我们的磁盘空间告警作业也收到了大量的磁盘空间告警邮件:

 

image

 

其实在白天的时候,该服务器就已经有磁盘空间告警邮件发出,由于系统管理员想在周末做存储扩容。所以在晚上数据库做DBCC CHECKDB时,就由于磁盘空间不足,遭遇了这个错误。DBCC CHECKDB时会生成数据库快照,而数据库的快照文件是基于稀疏文件(Sparse File),而当快照创建后,随着对源数据库的改变逐渐增多,稀疏文件也会慢慢增长。所以,当磁盘空间不足时,就会遇到下面错误信息:

 

1:Write to sparse file 'xxxxxxx.ndf:MSSQL_DBCC10' failed due to lack of disk

2:SSQL_DBCC10: Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered

 

此时由于磁盘空间不足,就会导致DBCC CHECKDB停止。关于DBCC CHECKDB耗用大量额外磁盘空间,可以参考下面这篇博客。

CHECKDB From Every Angle: Why would CHECKDB run out of space?

 

参考资料:

http://www.sqlskills.com/blogs/paul/checkdb-from-every-angle-why-would-checkdb-run-out-of-space/

相关实践学习
使用SQL语句管理索引
本次实验主要介绍如何在RDS-SQLServer数据库中,使用SQL语句管理索引。
SQL Server on Linux入门教程
SQL Server数据库一直只提供Windows下的版本。2016年微软宣布推出可运行在Linux系统下的SQL Server数据库,该版本目前还是早期预览版本。本课程主要介绍SQLServer On Linux的基本知识。 相关的阿里云产品:云数据库RDS&nbsp;SQL Server版 RDS SQL Server不仅拥有高可用架构和任意时间点的数据恢复功能,强力支撑各种企业应用,同时也包含了微软的License费用,减少额外支出。 了解产品详情:&nbsp;https://www.aliyun.com/product/rds/sqlserver
相关文章
|
Web App开发 前端开发
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
789 0
|
SQL Java 数据库连接
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
209 0
排错-Error--memory violation Exception ACCESS_VIOLATION received解决方
排错-Error--memory violation Exception ACCESS_VIOLATION received解决方
228 0
SignTool Error: An error occurred while attempting/Error information: “SignerTimeStamp() failed.“
SignTool Error: An error occurred while attempting/Error information: “SignerTimeStamp() failed.“
148 0
Error information: “Error: SignerSign() failed.“ (-2147012889/0x80072ee7)
Error information: “Error: SignerSign() failed.“ (-2147012889/0x80072ee7)
126 0
|
Go iOS开发
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
455 0