Solved

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

Posted on 2014-10-05
7
241 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 51

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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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 51

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 51

Expert Comment

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

Cheers
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

626 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