HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Will a DBCC CHECKDB with repair have to rescan?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
repairwithdbccrescancheckdbwillhave

Problem

I've run a DBCC CHECKDB and it found allocation errors. When I run it with REPAIR_ALLOW_DATA_LOSS - will it need to take the same amount of time to scan for errors, or will it attempt to use the last CHECKDB I ran and go faster?

(SQL Server 2000. Yes its ancient, no I can't upgrade.)

Solution

To add to the answer above, if you're on Enterprise Edition, where a normal DBCC CHECKDB will run in parallel, when you run with a repair option it must run single-thread, so it will also take more time.

Any DBCC CHECK command has to scan all the data as the results from any previous DBCC CHECK command are

-
not persisted anywhere

-
in no way can be trusted to still be accurate.

Also be wary of REPAIR_ALLOW_DATA_LOSS on SQL Server 2000 - there are many repairs that do not work correctly, that I fixed for SQL Server 2005 as part of my general rewrite of the code base.

Thanks

Context

StackExchange Database Administrators Q#140943, answer score: 6

Revisions (0)

No revisions yet.