dbTalk Databases Forums  

Badly corrupted file - unable to recover

comp.databases.btrieve comp.databases.btrieve


Discuss Badly corrupted file - unable to recover in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fernando
 
Posts: n/a

Default Badly corrupted file - unable to recover - 01-02-2004 , 01:56 PM







Hi there. Happy new year.

I have been getting file corruption errors for a long
time now, and I think I finally found the reason a couple
of days ago: my little network hub. An article from
GoldstarSoft and a check on packet collisions with a
different hub led me to this conclusion.

Now I've noticed that my files are heavily corrupted.
My application performs the necessary BUTIL calls to
recover most of the files, even though the results
are not too convincing. Btrieve might think they
are valid files, but many records have been displaced
by two characters and are probably useless.

One file in particular keeps me stuck. The problem
is that the recovery process doesn't succeed if I
use the menu option inside my application. I get a
'BUTIL-2: Message file initialization ...' error.

Instead, both BFILTER and BTUTIL seem to come to a
happy ending (DSAVE3A completely messes the file),
but the application refuses to boot when their
recovered version of the file is used.

I can also produce a valid empty similar file,
but as soon as the corrupted records are loaded,
the application doesn't boot.

In my opinion, it uses the owner name of this particular
file as an anti-copy protection. The application uses
a parallel port dongle, where this owner name might be
stored. I don't know this name, but I guess that
I need it if I want to restore the file from outside
the application. I understand that the process of
rebuilding the file without stating the owner name
simply leaves it blank.

I'm using a NetWare 3.12 server with the last patches
applied and a mix of Win9x clients. The application
is DOS-based, compiled very long ago from QuickBasic 4.5
sources that I obviously don't have, and uses
BTRIEVE.EXE 5.1 as a requester, although the version
of BUTIL is 6.x. Contacting the original programmer
is not possible.

I'd like to know if there exists a way to do the
recovery process (don't care about the owner name
by itself), and also would like to know if my several
guesses sound like correct. I'm quite a newbie on all
these matters but need to bring the application to
working condition as soon as possible. I can bet I'm
the person in the world who has read most about
Btrieve in vane in the last two days.

Many thanks, at least for reading. English is not my
mother tongue, so sorry for any mistakes.

Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Badly corrupted file - unable to recover - 01-02-2004 , 09:41 PM






Sounds like you may have been bitten by the RealTek/DLink bug. On your
Win98 machines, check the network card (NIC) drivers for a driver
version dated 04/23/1999. This is especially critical if you see
RealTek or DLink as the NIC manufacturer, and Microsoft as the driver
manufacturer. Replace those faulty MS drivers with valid ones from the
NIC manufacturer's web site as the FIRST step.

The owner name is needed to open the file by the application. However,
if the owner name is NOT present on the file, an attempted open by the
application WILL succeed. As such, the lack of an owner name is not
likely to cause your problem, but more likely the badly mangled data
records are affecting it.

The standard BUTIL recovery process is outlined on our white paper at
www.goldstarsoftware.com/press.htm on the topic of maintaining Btrieve
files. However, it sounds like your corruption has gone beyond what
these tools can accomplish for you. If you want, send me a copy of the
bad file and I'll see how much data can be saved. Of course, as you
probably already know, since the Btrieve database format doesn't look at
the data inside each record at all, it may recover data properly from
the Btrieve structure which is hopelessly damaged internally (and only
the application would be able to tell for sure). However, we can at
least try...

If the file is small, send it to me via Email. If it is large, let me
know (via EM) and I'll send you info on our FTP site to upload it to.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: March, 2004: See our web site for details!

Fernando wrote:

Quote:
Hi there. Happy new year.

I have been getting file corruption errors for a long
time now, and I think I finally found the reason a couple
of days ago: my little network hub. An article from
GoldstarSoft and a check on packet collisions with a
different hub led me to this conclusion.

Now I've noticed that my files are heavily corrupted.
My application performs the necessary BUTIL calls to
recover most of the files, even though the results
are not too convincing. Btrieve might think they
are valid files, but many records have been displaced
by two characters and are probably useless.

One file in particular keeps me stuck. The problem
is that the recovery process doesn't succeed if I
use the menu option inside my application. I get a
'BUTIL-2: Message file initialization ...' error.

Instead, both BFILTER and BTUTIL seem to come to a
happy ending (DSAVE3A completely messes the file),
but the application refuses to boot when their
recovered version of the file is used.

I can also produce a valid empty similar file,
but as soon as the corrupted records are loaded,
the application doesn't boot.

In my opinion, it uses the owner name of this particular
file as an anti-copy protection. The application uses
a parallel port dongle, where this owner name might be
stored. I don't know this name, but I guess that
I need it if I want to restore the file from outside
the application. I understand that the process of
rebuilding the file without stating the owner name
simply leaves it blank.

I'm using a NetWare 3.12 server with the last patches
applied and a mix of Win9x clients. The application
is DOS-based, compiled very long ago from QuickBasic 4.5
sources that I obviously don't have, and uses
BTRIEVE.EXE 5.1 as a requester, although the version
of BUTIL is 6.x. Contacting the original programmer
is not possible.

I'd like to know if there exists a way to do the
recovery process (don't care about the owner name
by itself), and also would like to know if my several
guesses sound like correct. I'm quite a newbie on all
these matters but need to bring the application to
working condition as soon as possible. I can bet I'm
the person in the world who has read most about
Btrieve in vane in the last two days.

Many thanks, at least for reading. English is not my
mother tongue, so sorry for any mistakes.


Reply With Quote
  #3  
Old   
Fernando
 
Posts: n/a

Default Re: Badly corrupted file - unable to recover - 01-03-2004 , 08:00 AM




Quote:
Sounds like you may have been bitten by the RealTek/DLink bug.
On your Win98 machines, check the network card (NIC) drivers
for a driver version dated 04/23/1999. This is especially
critical if you see RealTek or DLink as the NIC manufacturer,
and Microsoft as the driver manufacturer. Replace those
faulty MS drivers with valid ones from the NIC manufacturer's
web site as the FIRST step.
I don't need to check the particular version of the drivers
simply because *all* of my NIC's use chips from RealTek.
Different manufacturers, different models, different drivers
but all are RealTek. Even the server's one, although its
driver was downloaded from Novell. Now I know that I need to
visit realtek.com immediately. Unfortunately, never heard
of this bug before. Does this mean that my hub is not to
blame, then?.

Quote:
The owner name is needed to open the file by the application.
However, if the owner name is NOT present on the file, an
attempted open by the application WILL succeed. As such,
the lack of an owner name is not likely to cause your problem,
but more likely the badly mangled data records are affecting
it.
All of the files are of course full of badly mangled data
records. Before recovery, though, the application starts
normally. It shows bargage from time to time, but it loads.
After recovery, the error from the application about this
particular file is not 'Corrupt file'. Instead, it says
something like 'This file doesn't belong to you'. I recall
that when we bought the application, the seller boasted: if
somebody copies your data files and try to open them on a
different legal installation of our program, he won't succeed.
When I read about the owner name feature on Btrieve files,
I thought this was the way to accomplish this announced
data-theft protection. I might be wrong, of course.

Quote:
The standard BUTIL recovery process is outlined on our
white paper at www.goldstarsoftware.com/press.htm on the
topic of maintaining Btrieve files. However, it sounds
like your corruption has gone beyond what these tools
can accomplish for you. If you want, send me a copy of
the bad file and I'll see how much data can be saved.
I have already tried the standard BUTIL process. It seems
to be the same operation as the one performed from inside
the application. The -STAT, -RECOVER and -CLONE commands
work fine, but -LOAD loads the records normally and at
the end gives an error message.

Quote:
Of course, as you probably already know, since the
Btrieve database format doesn't look at the data inside
each record at all, it may recover data properly from
the Btrieve structure which is hopelessly damaged
internally (and only the application would be able to
tell for sure). However, we can at least try...
Right. Using the application to browse through other
files that I'm allowed to recover shows a hellish
panorama, if you know what I mean. The recovery process
succeeds, but the result contains as much garbage as
before. This garbage, however, seems to be produced by
a two character displacement on random records, so I
think something can still be done.

Quote:
If the file is small, send it to me via Email. If it
is large, let me know (via EM) and I'll send you info
on our FTP site to upload it to.
I've sent you an e-mail. My domain is ono.com.

Many thanks for your help. Greatly appreciated.


Reply With Quote
  #4  
Old   
Bill Bach
 
Posts: n/a

Default Re: Badly corrupted file - unable to recover - 01-04-2004 , 10:19 PM



My attempts to send you Email were thwarted -- apparently, your system
is blocking CompuServe's Email servers. Instead, I'll post it here:

Quote:
After reviewing the file, I've found that this file was not corrupted by
the database software, but rather by a bad computer or (more likely) a
bad network card or driver.

I found several places, scattered throughout the file, where two bytes
have been added to the data file. This is indicative of the "Real-Tek"
bug, caused by using a Real-Tek or D-Link network card with the
Microsoft drivers dated 04/23/1999, as previously mentioned.

Strangely, they don't seem to appear at the intervals I expected in
every case, so this means that either the file was corrupted during a
FileCopy operation or that it was just affected during larger sets of
updates.

My first question for you is: Do you have a backup of this file that you
can restore back to? From a review of the exported data (from BUTIL
-RECOVER), I believe that there are only about 15-20 individual points
of corruption in the file, but they can be tricky to work out in some
cases (especially since I don't know much about what the data is
supposed to look like). Each of these will take about 10 minutes to
resolve, so I could easily spend a few hours on trying to fix the file,
which would rack up a bill of several hundred USD rather quickly.
Obviously, going to a backup copy would be much easier and cheaper.

Had it just been one or two spots, I probably could have had it fixed at
no charge, but this will eat up far too much time for what we can
provide for free. As such, recovering a backup copy is your best bet.

I expect a data recovery to be mostly successful, but I do believe that
a few records are already lost (unless I find two bytes corrupting the
beginning of a data page somewhere, and records resurface afterwards),
and it is possible that the last two bytes of a record or two will also
be lost, but it should at least be enough to get your software
functional again.

If you want us to proceed with the data recovery, please let me know,
and we can discuss payment options.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***

Quote:
Does this mean that my hub is not to blame, then?
I exonerate your hub -- it is likely to be quite safe, and the NIC's are
the problem.

Please note that this issue can ALSO corrupt NON-Btrieve files -- since
it can insert an extra two bytes in ANY file that is being transferred.
This can lead to corrupted Word docs, corrupted DLL's, EXE's, and just
about anything else that crosses the wire. The effects of such
corruption may be benign at best (a typo in a Word doc), or can cause
strange GPF's in applications. Luckily, it is only caused when WRITING
to the network with the bad driver -- reads will not be affected.

If you have an Email address that can accept messages from Compuserve,
please contact me from it.
BillBach (AT) compuserve (DOT) com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.