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 ReFS-formatted volume. The error messages resemble the following:
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.
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.
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.
Notes
Msg 5030, Level 16, State 12, Line 1
The database could not be exclusively locked to perform the operation.
Msg 7926, Level 16, State 1, Line 1
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.
The database could not be exclusively locked to perform the operation.
Msg 7926, Level 16, State 1, Line 1
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.
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.
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.
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.