DBCC CheckDB  fails with error 7926 and error 5030

Posted on 2008-11-13
Last Modified: 2012-05-05
DBCC CheckDB will not run against databases.


DBCC CheckDB('master')


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.

I'd be very grateful for some help

Question by:DavidHannen
    LVL 31

    Accepted Solution

    1. The SQL Server startup account does not have sufficient permission on the SQL Server data folder.
    2. At least one other connection is using the database against which you  run the DBCC CHECK command.  
    3. The database contains at least one file group that is marked as read-only.

    For more information regarding this issue, please refer tot the following
    KB article:

    Error message when you run any of the DBCC CHECKDB commands in SQL Server
    2005: "The database could not be exclusively locked to perform the

    Author Closing Comment

    I had given the SQL Server Service account the correct permissions to the wrong folder. Doh!

    Thanks for the push in the right direction. Sometimes caanot see for looking!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    Viewers will learn how the fundamental information of how to create a table.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now