FIX: Can’t create database snapshot when you use DBCC CHECKDB in SQL Server 2014

Applies to: SQL Server 2014 EnterpriseSQL Server 2014 EnterpriseSQL Server 2014 Developer

Symptoms


Assume that you have a database that contains read-only filegroups in Microsoft SQL Server 2014. When you run DBCC CHECKDB on the database, the DBCC command can’t create a database snapshot for the database.

If there's no other connection to the database, the DBCC operation is completed without errors. However, you receive the following error message:

DBCC CHECKDB will not check SQL Server catalog or Service Broker consistency because a database snapshot could not be created or because WITH TABLOCK was specified.

If there are other connections to the database, the DBCC operation fails, and you receive the following error message:

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.

Resolution


Cumulative Update information

The issue was first fixed in the following cumulative update of SQL Server.

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.