Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DBCC CHECKDB blocking itself Expand / Collapse
Author
Message
Posted Monday, December 23, 2013 12:39 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, November 16, 2014 8:25 PM
Points: 72, Visits: 252
Hi,

DBCC CHECKDB on a ~600GB database and is taking quite a while to complete recently (~20 hrs). It completed in around 2 hrs.

While looking at it, the process running the DBCC CHECKDB command is blocking itself. The lastwaittype says as LATCH_EX and waitresource is DBCC_OBJECT_METADATA ().

Any help to improve this is much appreciated.

Cheers,

Post #1525421
Posted Monday, December 23, 2013 4:52 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
Usually DBCC CHECKDB should be executed during off-peak hours. What is type of server? i.e. prod, dev, test? what is the size of database? Command blocking spid is same as executing? Do you found any error in error log?

Check following link might help you:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/030b1c5a-f8ef-49a1-893d-50dffd71a84a/dbcc-checkdb-blocking-itself-sql-2008-mscrm

HTH


---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Post #1525468
Posted Monday, December 23, 2013 5:26 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, November 23, 2014 11:23 PM
Points: 1,281, Visits: 1,761
Are you on SQL2008R2 SP2? http://support.microsoft.com/kb/2634571
http://blogs.msdn.com/b/psssql/archive/2012/02/23/a-faster-checkdb-part-ii.aspx

Try DBCC CHECKDB WITH PHYSICAL_ONLY
Post #1525485
Posted Monday, December 23, 2013 7:43 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, November 16, 2014 8:25 PM
Points: 72, Visits: 252
free_mascot (12/23/2013)
Usually DBCC CHECKDB should be executed during off-peak hours.


DBCC scheduled to run off-peak hours

What is type of server? i.e. prod, dev, test?

PROD
what is the size of database? Command blocking spid is same as executing? Do you found any error in error log?


~600GB is the size of the DB and the same spid is blocking itself. Of the 17 threads spawned, 7 are blocking itself with the waittype LATCH_EX and the remaining are waiting on CXPACKET


http://support.microsoft.com/kb/906344/en-us


This kind of explains the behaviour. What would be the work around apart from waiting the 20+ hours?
Post #1525542
Posted Monday, December 23, 2013 7:55 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 AM
Points: 2,634, Visits: 3,985
Blocking by the same process itself is not a big problem .
Post #1525546
Posted Monday, December 23, 2013 7:34 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, November 16, 2014 8:25 PM
Points: 72, Visits: 252
Ratheesh.K.Nair (12/23/2013)
Blocking by the same process itself is not a big problem .


Is there any other way to improve the execution time (has gone from 2 hrs to 20+ hrs) apart from just waiting
Post #1525670
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse