Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's the best way to detect Data/Index Corruption?
Message
De
23/08/1999 17:51:16
 
 
À
22/08/1999 15:12:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00256419
Message ID:
00256829
Vues:
22
>>My question is, is there a way I can detect corruption as or soon after it happens? Is there some routine that I can run to constantly check for corruption and notify me? That way I could test various machines and operations to look for additional programmatic, client, or hardware problems. I can loop without an index to constantly check for corrupted records, but what, if any, is the best way to check for index and header problems?
>
>There is no way you can totally check for corruption. I've seen times when it doesn't show it's ugly head for months after it really happens. One thing you can do is SEEK a particular record using different tags and GOTO . Pick a record near the end of the table. While this won't guarantee that your data/index is not corrupted, it may catch it sometimes.


Craig, in DataFlex I wrote a routine that would run through the file serially with no index in place counting the records. Then I would run through again with each index active counting again. Then compare the counts. This seamed to help disclose a busted index. What do you think about this method?

It would probably be necessary to distinguish between Rushmore aided counts (SET OPTIMIZE ON) and plain counts (SET OPTIMIZE OFF).

I had a case the other night where I was looking for records with a particular date-time. With Rushmore on I asked:

COUNT FOR tStart = ltStart

I would get a small number. But if I turned Rushmore off I would get a much bigger number.

I deleted all of the indexes (DELETE TAG ALL) and recreated them. Same problem. Then I made a copy of the table, ZAPped it, and reAPPENDed all of the records. Problem solved!


Peter Robinson
Peter Robinson ** Rodes Design ** Virginia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform