Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REINDEX - Without EXCLUSIVE.
Message
 
To
22/05/2004 18:21:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00841224
Message ID:
00907044
Views:
38
>> ...
>> To reindex, I have to ask current users to get out and stay out until I call back - this is something that I dread, because it takes time, and when you think everybody is out, a new user gets in...
>
>This part I solved as follows. We don't work 24/7, but sometimes we need emergency maintenance. So, for several maintenance tasks, I create a file called "maintenance.tmp" in the shared directory. A Timer will check every 2 minutes, and if it finds this file, invoke the application object's OnQuit() method (using Visual Extend).
>
>On application start, the program checks for this same file. If it exists, it will give a corresponding error message, and quit.
>
>One potential problem is that the OnQuit() method might show a dialog (especially if there are pending changes), instead of quitting immediately. So far, it seems that this wasn't a problem in actual practice.

Hi Hilmar,
Thanks for your comment.
The problem with automating an exit is the pending changes. We use a technique very similar with the one you describe in other areas, but for reindexing, so far, the most reliable way is to talk to the users. We can cut them off in more than one way, for example, sometimes we use the 'Computer Management' to close a file - not only we may create extra data inconsystencies but I had a case when I had to reindex again very shortly after the first reindex, and I became suspicious... If CDX could be fixed reliably without exclusive use, that would be the second best thing after finding/eliminating the true cause of corruption.
Doru
Previous
Reply
Map
View

Click here to load this message in the networking platform