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: Friday, June 5, 2015 2:54 AM
Points: 73, Visits: 258
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: Tuesday, July 14, 2015 4:43 AM
Points: 2,793, Visits: 2,163
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


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 6:54 PM
Points: 1,579, Visits: 1,956
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: Friday, June 5, 2015 2:54 AM
Points: 73, Visits: 258
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: Tuesday, August 18, 2015 5:25 PM
Points: 2,696, Visits: 4,141
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: Friday, June 5, 2015 2:54 AM
Points: 73, Visits: 258
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
Posted Monday, July 27, 2015 12:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 11, 2015 7:15 AM
Points: 4, Visits: 118
I have found the exact same issue. Does anyone have a solution yet? On production I am doing a physical_only so the time there is not a problem but I am restoring the backup to another server in order to do a CHECKDB to make sure everything is in order. I pinpointed in down to a single table and the DBCC CHECKTABLE is taking 11 hours on a 1.1 billion row table that has a clustered index on two columns (int, bigint) and a non-clustered index on a single int column. There are no relationships.

Literally 100% latch time is DBCC_OBJECT_METADATA and it is always waiting on CXPACKET. There is a lot more CPU than I/O.

This is running on WS2012 std, SQL2012 SP2 (11.0.5569.0). 4 CPU, 12G.
Post #1706103
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse