TechTips: Dealing with corruption in shared databases

The Paradox databases which underly all Paradox and most Delphi
applications are built upon a file-sharing technology that has been used
for thousands of applications for many years.  It should be perfectly
normal for a database such as this to run up to 50 concurrent users,
"all day every day," with no problems at all.  An occasional hiccup
maybe, but a chronic or persistent problem?  No.  Like a cough, check it
out.

The first place to look is with the workstations themselves.  EVERY
system that interacts with the database in any way (including the server
computer upon which the files are stored, if anyone logs on to that
machine and does any work at all), must be correctly and consistently
configured:

(1)  The version of Windows must be consistent, and recent.

(2)  The version of BDE that is installed should also be fairly current,
and once again consistent.

(3)  In the configuration file, LOCAL SHARE should be TRUE and the NET
FILE DIR setting must be consistent.  Actually test the application to
be sure that locks are being detected and respected.

On the hardware side, check server logs for signs of trouble.  Remember
that network hubs, cards and cables can fail and that sometimes there is
no visible indicator.  For example, the green "continuity" light may
continue to glow even though the connection is marginal.

Keep a diary.  Note changes in it.  Note problems and their resolution.
Date and time each entry.  Very often, patterns that escape your
recollection will be visible there.

Practice regular maintenance and verification of your databases.  This
means watching out for trouble -before- your users discover it.  Our
ChimneySweep? product can be set up to verify and optimize databases
every day or several times a day on a regular schedule, and to back-up
the information also (making on-disk copies).  [And did I mention we can
do it up to 100 times faster than TUTIL32?]  A database can actually
have a "broken link" or some other internal problem, not detected by
Paradox's usual mechanisms (which involve change-counters in the file
header), that may exist for some time until someone literally stumbles
into it (and having stumbled, coughs up a piston and dies .. so to
speak).  

I'm not "recommending this because we happen to sell a product that will
do it ..."  No, it's actually the other way around.  :-)  A database is
a critically important resource to yourself, and/or to your clients.  
PRO-ACTIVE database verification and optimization should be performed by
every installation, before problems are detected and even if they are
not detected for many years, for the selfsame reason that you run
ScanDisk on your drives.

----------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)

Quote
> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  Release 4.0 is here!!
> http://www.sundialservices.com/products/chimneysweep