Discussion:
corrupt or damage table.
(too old to reply)
Patrick Tura
2009-07-11 10:09:11 UTC
Permalink
Hi!

Have experience corruption of a dbf file? Im just puzzled that some table
have a tendency to become corrupted frequently particulary those are access
regularly some that are seldom access are ok.

However, everytime, I experience corruption, I can repair it but I want to
understand what could be the possible reason why such situation can happen?

Do you think it has to do with many users accessing the same table at the
same time?

or do you think it has to do with hardware?

Today, most often linking different tables is quite common method to get a
certain data but that is normal? But it the table should get damaged?

I have three table that are regularly use, biodata.dbf, book.dbf and
contracts.dbf. Biodata contains the name of our clients and book contains
the detail transactions while contracts.dbf is containing the detail of the
contracts and the three are link with client_id among the common field.

but so far, I observed that contracts.dbf most often got corrupted. when it
is corrupted the encoder cannot add new record. This is frequent happening.

Any idea?

/patrick
Stefan Wuebbe
2009-07-12 09:13:02 UTC
Permalink
Post by Patrick Tura
However, everytime, I experience corruption, I can repair it but I want to
understand what could be the possible reason why such situation can happen?
I'd say DBF corruption may happen when FoxPro is getting interrupted
during a write attempt.
So the causes can be failing hardware/drivers/network/power supply.
And 3rd party tools being hooked into Windows file operation events,
like AntiVirus tools, for instance. And third, probably lees likely, would
be "plug-pulling" users.

So while good practice might include using data buffering and keep
TableUpdate() attempts / Transactions as short as possible, if corruption
occurs frequently in a given environment, the only way to actually solve
the issue would be outside VFP.



hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Patrick Tura
2009-07-13 07:09:20 UTC
Permalink
Thanks a lot for your reply Stefan.

I can see that it is a deep problem technically:-)

Thanks a lot.

Patrick Tura
Post by Stefan Wuebbe
Post by Patrick Tura
However, everytime, I experience corruption, I can repair it but I want
to understand what could be the possible reason why such situation can
happen?
I'd say DBF corruption may happen when FoxPro is getting interrupted
during a write attempt.
So the causes can be failing hardware/drivers/network/power supply. And
3rd party tools being hooked into Windows file operation events, like
AntiVirus tools, for instance. And third, probably lees likely, would be
"plug-pulling" users.
So while good practice might include using data buffering and keep
TableUpdate() attempts / Transactions as short as possible, if corruption
occurs frequently in a given environment, the only way to actually solve
the issue would be outside VFP.
hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Stefan Wuebbe
2009-07-13 07:45:33 UTC
Permalink
Post by Patrick Tura
Thanks a lot for your reply Stefan.
I can see that it is a deep problem technically:-)
You are welcome :-)

Can you track down what the cause(s) might be, e.g. power supply
failures, unreliable file server or network devices, or so?



Regards
-Stefan
Patrick Tura
2009-07-15 10:54:19 UTC
Permalink
Yes, Estefan, tracing is seems to the only option I have to find out what is
really wrong.
Again, thank you very much for your time and effort. Your tips are helpful.

Patrick Tura
Post by Stefan Wuebbe
Post by Patrick Tura
Thanks a lot for your reply Stefan.
I can see that it is a deep problem technically:-)
You are welcome :-)
Can you track down what the cause(s) might be, e.g. power supply
failures, unreliable file server or network devices, or so?
Regards
-Stefan
Craig Berntson
2009-07-13 16:56:50 UTC
Permalink
- NEVER use Browse. It accesses the tables directly and is definately a
cause of corruption that I've seen
- ALWAYS use buffering. Never directly edit the table, but use a view,
cursor, or memvars, then update the actual table
- Make sure users never just shutdown their PC before exiting the
application
- Check for power interruptions. Servers often have backup power,
workstations sometimes, but how about routers, switches, hubs, etc
- Verify network cabling is good and solid
--
Craig Berntson
Microsoft MVP

-------------
Post by Patrick Tura
Hi!
Have experience corruption of a dbf file? Im just puzzled that some table
have a tendency to become corrupted frequently particulary those are
access regularly some that are seldom access are ok.
However, everytime, I experience corruption, I can repair it but I want to
understand what could be the possible reason why such situation can happen?
Do you think it has to do with many users accessing the same table at the
same time?
or do you think it has to do with hardware?
Today, most often linking different tables is quite common method to get a
certain data but that is normal? But it the table should get damaged?
I have three table that are regularly use, biodata.dbf, book.dbf and
contracts.dbf. Biodata contains the name of our clients and book contains
the detail transactions while contracts.dbf is containing the detail of
the contracts and the three are link with client_id among the common
field.
but so far, I observed that contracts.dbf most often got corrupted. when
it is corrupted the encoder cannot add new record. This is frequent
happening.
Any idea?
/patrick
Patrick Tura
2009-07-15 10:57:19 UTC
Permalink
Hi Craig,

Thanks a lot for your tips, they are very helpful to me.
I need to probably trace down the hardware thing as you have suggested.
We will see what I will find out.

Thank You.

Patrick Tura
Post by Craig Berntson
- NEVER use Browse. It accesses the tables directly and is definately a
cause of corruption that I've seen
- ALWAYS use buffering. Never directly edit the table, but use a view,
cursor, or memvars, then update the actual table
- Make sure users never just shutdown their PC before exiting the
application
- Check for power interruptions. Servers often have backup power,
workstations sometimes, but how about routers, switches, hubs, etc
- Verify network cabling is good and solid
--
Craig Berntson
Microsoft MVP
-------------
Post by Patrick Tura
Hi!
Have experience corruption of a dbf file? Im just puzzled that some table
have a tendency to become corrupted frequently particulary those are
access regularly some that are seldom access are ok.
However, everytime, I experience corruption, I can repair it but I want
to understand what could be the possible reason why such situation can
happen?
Do you think it has to do with many users accessing the same table at the
same time?
or do you think it has to do with hardware?
Today, most often linking different tables is quite common method to get
a certain data but that is normal? But it the table should get damaged?
I have three table that are regularly use, biodata.dbf, book.dbf and
contracts.dbf. Biodata contains the name of our clients and book contains
the detail transactions while contracts.dbf is containing the detail of
the contracts and the three are link with client_id among the common
field.
but so far, I observed that contracts.dbf most often got corrupted. when
it is corrupted the encoder cannot add new record. This is frequent
happening.
Any idea?
/patrick
Loading...