Summary

In Microsoft SQL Server 2012 or an earlier version of SQL Server, you may encounter error messages when you run the DBCC CHECKDB command for a database that has its files located on an Resilient File System (ReFS) -formatted volume. The error messages resemble the following:

Msg 5030, Level 16, State 12, Line <LineNumber>
The database could not be exclusively locked to perform the operation.
Msg 7926, Level 16, State 1, Line <LineNumber>
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.

If there are no users connected to the database, the DBCC CHECKDB command will obtain exclusive lock against the database, and then perform the checks against the database, instead of using the internal snapshot that it typically uses.

Cause

This problem occurs because SQL Server cannot create the internal snapshot database by using named streams when the database files are located on an ReFS volume.

Resolution

This problem is resolved in Microsoft SQL Server 2014. Beginning in this version of SQL Server, the DBCC CHECKDB command does not use named streams to create the internal snapshot database. Instead, it uses sparse files.

Notes

  • The information in this article applies to all the consistency check commands in the DBCC CHECKDB family (DBCC CHECKTABLE, DBCC CHECKALLOC, and DBCC CHECKCATALOG).

  • ReFS means Resilient File System, and it was introduced in Windows Server 2012.

More Information

How DBCC CHECKDB creates an internal snapshot database beginning with SQL Server 2014

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×