Solved

DBCC checkdb (repair)-- any way to split it up or watch progress?

Posted on 2014-10-05
7
236 Views
Last Modified: 2014-10-06
We have a large database with a partitioned table (1.5 TB partitioned by year 2003 to 2014) that showed errors detected by dbcc checkdb (physical only) -- about 80 errors, all limited to TWO of the partitions.  Because the database was running in simple recovery mode, we could not just replace damaged filetables or pages.

Running dbcc checkdb (repair_allow_data_loss) is taking forever (more than 36 hours), and it has failed 5 times so far, asking for expansions of different file groups-- most of which didn't have errors.  Each time we have run it, it has run for a while longer (several hours longer) then crashes,  asking for expansion of a different filegroup.

I can expand one file group, then two runs later, after it has crashed and asked for expansion of other file groups, it will come back and crash asking for expansion of a file group I have already expanded.

1.  Why is it involving filegroups that were not detected as bad by dbcc checkdb originally

2.  Every time it crashes, is it losing everything it accomplished in the hours it spent before the crash?

3.  Is there some way to do this piecemeal, one partition at a time.
0
Comment
Question by:dakota5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 3

Expert Comment

by:alanccw
ID: 40362784
Can you post the error logs?
0
 

Author Comment

by:dakota5
ID: 40362871
They aren't very useful.  The first just lists the pages and object IDs for the corruption; the second during repair states which filegroup is too small and asks me to make it larger.
DBCC-checkdb-fileonly-ExpertsExchange.tx
DBCC-crash-with-error-asking-for-space-E
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40363095
You can check each filegroup at a time but for repairing the only command available is the DBCC CHECKDB.
DBCC CHECKFILEGROUP (1)  -- Parameter is the filegroup number

Open in new window

0
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 

Author Comment

by:dakota5
ID: 40363437
OK-- But why is it touching filegroups that did not have corruption revealed by DBCC checkdb?
What could DBCC checkdb (repair) be doing to these non-corrupted filegroups.

These filegroups all involve clustered indexes. Is it rebuilding indexes that are not corrupted.  How can I determine what DBCC checkdb (repair) is actually doing?
0
 
LVL 50

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40363452
The DBCC CHECKDB with repair option doesn't mean that it going to work only on corrupted data. It means "do a full check database and if you find an error try to repair it".

From BOL you have:
After the DBCC CHECKDB command finishes, a message is written to the SQL Server error log.
(...)
A dump file (SQLDUMPnnnn.txt) is created in the SQL Server LOG directory whenever DBCC CHECKDB detects a corruption error.

Here's a link to everything you need to know about DBCC. It was written by Paul Randall, just the man that rewrote the DBCC CHECKDB command for SQL Server 2005 and knows more about it than other person in the world.
0
 

Author Closing Comment

by:dakota5
ID: 40363482
OK.  Now I get it.
Also, thanks for the link to Paul Randall's site.  That is an important reference.
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40363487
That is an important reference.
It's the Bible for DBCC CHECKDB ;)

Cheers
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question