DBCC CheckDB fails with error 7926 and error 5030

DBCC CheckDB will not run against databases.

Executing

DBCC CheckDB('master')

returns

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



DavidHannenAsked:
Who is Participating?
 
James MurrellConnect With a Mentor Product SpecialistCommented:
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
operation"
http://support.microsoft.com/?id=928518
0
 
DavidHannenAuthor Commented:
Thanks
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!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.