I get the following error within my maintenance plans:
Executing the query "DBCC CHECKDB(N'master') WITH NO_INFOMSGS " failed with the following error: "The database could not be exclusively locked to perform the operation. 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 failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
I get the following when I run the code from the query analyzer:
USE [master]
GO
DBCC CHECKDB(N'master') WITH NO_INFOMSGS, PHYSICAL_ONLY
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.
I've searched high and low trying to find a fix, but no dice.
FACTS:
- SQL Server 2008 R2 Standard 64-bit (10.50.4000.0)
- Windows Server 2008 R2 64-bit w/SP1
- VMWare Virtual Machine
- Production server, so I can't reboot server/instance without internal change management process
- SQL Server Agent & Database Engine service accounts have full access to the folders and files where the MDFs and LDFs are housed
- Restarted SQL Server Agent via Config Mgr.
- SQL Server Agent has read permissions on the entire volume
- There are no read-only FGs
- DBs are not in Single-user mode, read-only, or in emergency mode
- Not running TABLOCK with DBCC command
- The DBs are on NTFS
The following are a few places I've read out of many, but these are the most applicable to my matter as I see it. I've performed the suggested "fixes" with no change in result or error message output from the SQL Server Error Logs.