Sql-server – DBCC CHECKDB running longer

dbcc-checkdbola-hallengrensql serversql-server-2012

We are using Ola's Maintenance solution and part of that we have job DatabaseIntegrityCheck – User Database and System Databases, sometimes job for some of the databases it's running longer like in days and sometimes also it's skipping the DB
We have Sql server 2012 (Sql Server version is 11.0.5388.0 -Standard) and database is not that much big like under 10GB.
Someone's help really appreciated!

Added:

MAster DB is only 5 MB
Ola command:

sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d AdminDB -Q "EXECUTE [dbo].[DatabaseIntegrityCheck] @Databases = 'USER_DATABASES', @LogToTable = 'Y'" -b
 DBCC CHECKDB ([master]) WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY

Script is not blocked, it's running for longer for Master and another user DB
Other Databases ran fine.

Best Answer

There's a strong possibility that CU 4 for SP2 which was release in January of 2015 will resolve the issue you are experiencing: https://support.microsoft.com/en-us/help/3029825/fix-dbcc-checkdb-checktable-command-may-take-longer-in-sql-server-2012

That being said, you are running a SQL server that is out of support and SP2 CU 4 which should resolve the issue is out of support as well. You should go ahead and patch the server to the current SP4 CU 10 + the latest security updates.

It appears to me that you may also be running an old version of OLAs scripts based on the way you are calling them. They should be updated as well.