Detecting corrupt or invalid indexes ahead of time
Mike Schwartz
mschw at athenet.net
Wed Nov 5 11:36:31 PST 2008
Mike Schwartz wrote:
> Does anybody have a utility that detects a corrupt or invalid index
> before a user encounters it? If filePro can tell me that I have an
Make them a menu item that knows how indexes are built.
>
>
Invalid usually means the file is locked. Unlock the file and look again.
The fact that the index is returning incorrect data is troubling in all
cases.
Index issues can be caused by:
Nancy
----- ----- -----
Thanks for your explanation that "Invalid" usually means the file is
"locked". That is along the lines of what I am looking for, but I'm hoping
that Ken or perhaps Bob Stockler has some additional insight into what makes
an index appear to be invalid to dxmaint.
I presume you mean that filePro file is locked at the filePro level,
because you mention unlocking the file, but do you mean the index file
itself is locked at the operating system level?
And thanks to everybody who has responded with reasons an index can get
corrupted. We have been troubleshooting these (very occasional) problems on
and off for the past few weeks, but the customer isn't interested in paying
for us do a lot of troubleshooting on this system.
To restate the question I have:
Is there any utility that I can run or any programming method I could
use to examine every index on the system and tell me whether any of them
appear to be invalid to filePro? In other words if dxmaint can plainly see
that an index is invalid, can I use the same logic in a program I write
myself to determine if any of the indexes on my system are invalid, and have
the system print me a report of those indexes?
One other solution to this problem that has been suggested is to
rebuild all the indexes every night, but it takes about 10 hours to rebuild
them all. It would possible to rebuild them all over the weekend, but that
leads me to a "band-aid fix" question:
There are many reindexing utilities, including some I have written
myself, but all of the scripts that I am familiar with use the "rebuild on
existing keys" methodology. Do any of you have a script that reads the
header information on every index in a filePro system and creates a rebuild
line for each index with the actual fields listed on the line with "-rf"
options?
There are over 2,000 indexes on this system, including qualifiers, and
I'd hate to have to hand-write 2000 "from scratch" index rebuilding lines.
If I had such a script, I could build a batch file and run that. It
would be much better to blow away all the indexes each weekend and rebuild
all of them from scratch, rather than have to sit in front of my computer
screen and watch for 10 hours each weekend to see if any of the indexes
"hang" with an invalid error.
I know that the fields and length information is available for both the
pre and post-4.5 style indexes. I just want to know if anybody has written
such a script before I try to do it myself.
Thanks,
Mike Schwartz
More information about the Filepro-list
mailing list