Recognizing index corruption (was RE: Problem with dreport crashing)
Kenneth Brody
kenbrody at bestweb.net
Fri Aug 1 12:21:00 PDT 2008
Quoting Jeff Harrison (Fri, 1 Aug 2008 11:26:37 -0700 (PDT)):
>
> --- On Fri, 8/1/08, Chris Sellitto <sellich at guaranteedreturns.com> wrote:
> [snip]
>> time, this error is triggered by a bad index.
>>
>> My question is, is there a utility out there that could be
>> run manually, that might somehow recognize that an index is
>> bad? Is it even possible, and if so, does anyone know how
>> to write one?
>>
>
> I wrote one once. I don't have it any longer - However, you could
> easily write one with filepro. Just have a routine that examines a
> given index, then builds a new one on the same keys. Run a report
> off of each of the indexes - each one outputting to a different file
> name. The output should be a 1 line report containing just the
> pertinent key info. Then do a diff on the two files.
>
> I'm sure there must be an easier way to do this, but I believe that
> this is the approach that I used a few years ago when I needed to do
> this.
Depending on just how thorough you want to be, the "right way" to do it
would be:
Traverse the tree, following every branch, and verifying that every
branch was reasonable. (ie: the left branch points to a lower key,
and the right branch points to a higher key.)
Verify that every leaf node reached is higher than the previous one.
Verify that every leaf node contains the same value as the filePro
record it points to.
Finally, read the filePro file sequentially, and make sure that every
record can be found in the index.
--
Read the truth behind the movie "Expelled" at <http://www.ExpelledExposed.com>
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list