I have a maintenance plan on one of our infrequently used dev boxes which keeps failing on CheckDB on all user databases and most system databases. When trying to run CheckDB manually, I get the message below. I have tried to create a database snapshot and run CHECKDB from this however I am running on standard edition SQL 2014 so an error message is returned outlining that database snapshots are not supported on this version.

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.

Model and TempDB when ran manually complete their checkdb fine however anyother database has issues. I have other instances on the same server which complete their checkdb routines without issue so it seems to be something isolated to the specific instance.

  • ,Are you sure you are getting the CHECKDB error against the System Database as well as User Databases. On only the User Databases. – Md Haidar Ali Khan Feb 25 at 11:10
  • Are you using TABLOCK hint when running checkdb. Can you paste the query in the question – Shanky Feb 25 at 11:10
  • Hi @MdHaidarAliKhan, I get the error with master and msdb – Krishn Feb 25 at 11:38
  • Hi @Shanky, the syntax I use is 'DBCC CHECKDB('DS-Log-Dev') ', I have tried with TABLOCK returning the same error message – Krishn Feb 25 at 11:39
  • @Krishn When the checkdb fails when executed via MP, do you get same message or different one. You can check job history and post the message in question – Shanky Feb 25 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.