MSSQLWIKI

Karthick P.K on SQL Server

DBCC CheckDB fails with error "The database could not be checked as a database snapshot could not be created and the database or table could not be locked

Posted by Karthick P.K on March 6, 2010

 

DBCC CheckDB may with fail with error

Error

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.

 

Possible Causes Snapshot Creation Failure Reason

1. Database is having read only file group.

Check if the database is having read only file groups.

2. No Parse file support by the file system.

A. Parse file is not supported in FAT32 check the file system of the datafiles. If you use FAT32   use DBCC CheckDB with Tablock Option

B. To get the volume information of file system in which we have the data files SQL Server use  GetVolumeInformation API.

This API would fail if SQL Server startup account do not have full permission on Volume in which the data file is located.
Grant full permission for the startup account of SQL Server on the root volume of all the data files. To verify if the startup account of SQL Server has permission on volume in which data file is created use This EXE. It uses GetVolumeInformation to list the information about volume.

3. No alternate stream support.

 

Regards

Karthick P.K

3 Responses to “DBCC CheckDB fails with error "The database could not be checked as a database snapshot could not be created and the database or table could not be locked”

  1. http://sql-articles.com/articles/dba/dbcc-checkdb-a-read-only-databases/
    we can run on readonly DBs

  2. […] DBCC CheckDB fails with error "The database could not be checked as a database snapshot could n… […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: