Index maintenance
GCC Consulting
rkreiss at gccconsulting.net
Mon Dec 19 09:05:28 PST 2011
-----Original Message-----
From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
[mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
Behalf Of Ian Wood
Sent: Monday, December 19, 2011 11:38 AM
To: filepro-list at lists.celestial.com
Subject: Index maintenance
I am having an issue almost daily where a file is getting bad automatic
indexes.
OS is:
-----------------------------------------
System information
-----------------------------------------
Windows 2008 R2
(Server Standard Edition (full installation))
Mapi32 DLL build 1.0.2536.0 (win7_rtm.090713-1255)
filePro version is 5.014DN9
When looking at the index through dxmaint it says Invalid Index. I have to
delete the index and then rebuild it manually.
I need to be able to put this onto a menu to allow the user to do this as
they are not in the same building as me.
\fp\dxmaint -ra -e won't work as the index is invalid and when I go to build
it, the field values are blank.
I can't use the \fp\dxmaint -rf option as this is only for demand indexes as
far as I can see in the documentation.
The only thing I can think of is to copy the index to a named index while
the index is valid, and then have the menu script do the following (the bad
indexes are in a qualifier called label)
cd \filepro\gr_bag
del indexlabel.A
del indexlabel.B
copy indexlabel.goodA indexlabel.A
copy indexlabel.goodB indexlabel.B
cd\
\fp\dxmaint gr_bag -ra -e -m label
If anyone else has a better idea, feel free to shout it out.
I still need to find what is causing this, but I didn't write the code that
this process runs from and don't have time right now to dig though and/or
rewrite the process.
Ian Wood
Programmer/Analyst
Try the following replacing your file and field names:
@fp\dprodir foobar -L (deletes lockfile)
@fp\dprodir -Ie (deletes index E - replace E with your index letter or
number)
@\fp\dxmaint foobar -oe -e -rf 11:10:1 -h "Reconstructing foobar Index E"
The above can be added to a menu batch file. However, you really don't want
uses rebuilding this index without insuring that everyone is out of the
file.
It is NOT a good idea to delete the lockfile. I have done this for clients
where I have created an index maintenance menu and the need to rebuild auto
indexes that had disappeared or become corrupted for some reason. This was
more of an issue years ago then now.
I would suggest that you check all of the processing table which add or
modify records in this file and look for an unprotected lookup as that is
what normally will cause index corruption.
If you do put this option on a menu, password the menu or call this batch
file from a filepro processing table which asks for a password. This will
keep users from just rebuilding this index without thought.
Again, be careful here.
Richard Kreiss
GCC Consulting
Office: 410-653-2813
More information about the Filepro-list
mailing list