Sql-server – The operating system returned error 665(The requested operation could not be completed due to a file system limitation) on SQL Server 2014

dbccdbcc-checkdberrorssql server

Have a SQL Server 2014 instance running on Windows 2012 R2 that was running Ola Hallengren's DB integrity script. This is the error that resulted:

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 0x0001392f6ee000 in file
'H:\MSSQL12\Data\EDW_Data_6.ndf_MSSQL_DBCC15'. 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.

I checked both the event log and the SQL Server error log but not getting a lot of additional info that could help. I haven't rerun the DBCC check for this db yet. This database is pretty active as it is a data warehouse database. It's currently 10.5 TB. I've heard that if I rerun the dbcc it may clear out the MSSQL_DBCC15 however I'm hesitant to do that on this server due to the level of activity. My preference would be to copy the backup to another server and run the dbcc there. If I do that, is there any way for me to clean up the DBCC15 files left on disk on the primary server?

Any other places I could find more info other than event log and SQL Server error log?

Appreciate any thoughts on what could cause this error or the best option for running DBCC checkdb based on the situation.

Best Answer

DBCC creates a database snapshot, and database snapshots are implemented using NTFS sparse files. Error 665 reported for DBCC has been reported before, and blogged about by the CSS team, read:

The articles linked show the problem details, and the applicable fix (depends on your OS version and configuration).