Link to home
Start Free TrialLog in
Avatar of UrbanRiot
UrbanRiot

asked on

Corrupt BTR file (business vision)... attempt to fix with BUTIL fails. Please help.

I have a file called CUSTOMER.BTR that is corrupt (as reported by software Business Vision 32). I would like to get this file working again, with as little missing data as possible.

Following other forum postings I've seen with recommendations on fixing this problem, I attempted to use BUTIL.EXE to create a working version of this file, sans corruption.

BUTIL -STAT CUSTOMER.BTR  lists there being 9746 records.

BUTIL -RECOVER CUSTOMER.BTR CUSTOMER.REC  creates the .rec file, with 8148 records.

BUTIL -CLONE CUSTOMER.CLN CUSTOMER.BTR   successfully creates the clone file.

and then the problem:
BUTIL -LOAD CUSTOMER.REC CUSTOMER.CLN    fails!!  

I recieve the following error message:

BUTIL-66: BUTIL has loaded 0 records so far.

BUTIL-66: BUTIL has loaded 80 records so far.

BUTIL-14: The file that caused the error is CUSTOMER.REC.
BUTIL-100: An error occurred during the access of the sequential file.

BUTIL-9: The command did not complete due to an unrecoverable error.


The file is larger, so it did attempt to dump the files but failed. This file is not in use either, so that's not a possibility.

I am assuming that I am dealing with some really nasty corruption, considering it's looking like I've lost 1000 records. If anyone can give me a hand, suggestion or guidance on how to proceed I would appreciate it considerably. If there's a shareware alternative to fixing this file, I'm open to that. If there is a way to manually remove that corruption, that would be a bonus suggestion as well... Thank you in advance!
Avatar of Mirtheil
Mirtheil
Flag of United States of America image

If it's having trouble reading the sequential file (in addition to the Btrieve file), then you've got more than just corruption.  You may be having hardware issues.  
Try this:
1. Go to another machine and install (if it's not installed) the Pervasive Workgroup engine.
2. Copy the empty data file (CUSTOMER.CLN in your step) to the "other" machine.
3. Copy the exported sequential file (CUSTOMER.REC) to the "other" machine.
4. Run the BUTIL - LOAD again.  

Does it fail?  If not, then the problem is with the hardware on the first machine.  

Also, post the PVSW.LOG.  THere might be a clue in there.
Avatar of UrbanRiot
UrbanRiot

ASKER

I'm not running the version of Business Vision that uses the Pervasive Workgroup engine. I assume the access of the BTR files is built within the software of this version?

I attempted to do the recovery on another machine, as you suggested, in case the hardware was suspect and I have the same problems. The machines are pretty reliable though anyhow, with considerable redundancy, ECC RAM, etc.

I neglected to mention in the above, that the BUTIL -SAVE also quits out with an error message as well... as follows:

BUTIL-93: BUTIL has saved 0 records so far.

BUTIL-93: BUTIL has saved 119 records so far.

BUTIL-14: The file that caused the error is CUSTOMER.BTR.
BUTIL-100: Microkernel error = 2. The application encountered an I/O error.

BUTIL-9: The command did not complete due to an unrecoverable error.
If you've got Btrieve data files, you've got a Btrieve/Pervasive engine.  
I'm confused. Are you issuing a BUTIL -SAVE or a BUTIL -RECOVER?  They do the same thing although -SAVE allows you to also specify an index number.    
If you've got this much corruption, there should be something in the PVSW.LOG.  Post it.. It might give an idea as to what's happening..
Another option is to go to backup..
Please excuse my lack of knowledge on Btrieve databases, this is the first time I've had to deal with this problem.

I'm familiar with the Btrieve Pervasive engine, as I've setup servers with the engines running on them, however the engine does not run on either the server in this organization, or the clients.

I am pretty sure that this small business version of the Business Vision software uses the file format, but does not use the engine.

Regarding -save or -recover... I use recover, and it makes a recover file but I can't load that file into the cloned file, as I get the error listed above. I tried using the -save command only because it was part of the documentation I recieved about recovering corrupted files. That command fails for me, with the error listed above.  Thank you for taking the time to try to help.

I'm trying to avoid using backups, as they were a little lax and don't have any recent backups.
You can't use the files without an engine.. It may be an older version (look for WBTRV32.DLL and W32MKDE.EXE or W3BTRV7.DLL and a few others).  

So let me make sure I understand what you've done:
1. You've gotten an error from the application indicating corruption. Does it give an error code?
2. You tried BUTIL -RECOVER and then BUTIL-CLONE and then BUTIL -LOAD and got progessively fewer records.  
Is that correct?  

What do you get if you issue a BUTIL -VER on the primary machine where the CUSTOMER.BTR resides?  

Try this:
1. Disable any AntiVirus software on the machine.
2. Copy the CUSTOMER.BTR to a differerent directory.
3. Issue  BUTIL-CLONE CUSTOMER.CLN CUSTOMER.BTR  on the original machine in the 'new' directory (from step 2).
4. Issue a BUTIL -COPY CUSTOMER.BTR CUSTOMER.CLN on the original machine in the 'new' directory (from step 2).
5. Post any errors. If there are no errors compare number of records.
Further, I searched for any other type of log file either on the client systems in the program directory, and on the server in the data shares and there were no recent logs, at least not within the last 6 months.

What I meant above, is that I believe the program itself has the ability to open and write to Btrieve files and that it doesn't use the memory resident Btrieve / Pervasive engine... ?
I appreciate your help immensely.

Btrieve files are in the client software folder, so it loads them transparent to the user upon starting the software.

BUTIL-33: The Btrieve Requester version is 6.15.

BUTIL-128: The Microkernel version is 6.15.3

I will attempt your two other suggestions shortly. Thank you!!
An application can't open the Btrieve files without an engine.  The file format is proprietary and cannot be opened directly.  There has to be a memory resident Btrieve / Pervasive engine.  
What's the result of BUTIL -VER?
Btrieve 6.15 doesn't show up in the System Tray. You will see a W32MKDE.EXE process in task manager however.  This is the memory resident Btrieve engine.

butil -copy customer.btr customer.cln

File Manager Version 6.15
Copyright 1982 - 1995, Btrieve Technologies, Inc.
All Rights Reserved.


BUTIL-57: BUTIL has copied 0 records so far.

BUTIL-57: BUTIL has copied 80 records so far.
BUTIL-100: Microkernel error = 54. The variable-length portion of the record is
corrupt.

BUTIL-9: The command did not complete due to an unrecoverable error.
You are correct, sir. When I run the Business Vision program, it automatically starts W32MKDE.EXE process as listed in process manager.
Based on the error you are seeing, there is a variable length portion that is corrupt.  You might be able to save the file as a Sequetial file and the find the 81st record and remove it (or remove the variable length portion) and then try to LOAD the records again. Don't be surprised to see more errors like this.
My ignorance continues...  how would I save it as a sequential file (or did I?) and what would I use to edit it manually?
Perhaps there is someone on this site that offers this service at a reasonable rate?
ASKER CERTIFIED SOLUTION
Avatar of Mirtheil
Mirtheil
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This software did not work for me... I tried both versions offered on his web page and they seem to sit without doing any work after an initial message.

However, you've helped me far more than I expected to recieve any help with this issue and for that I thank you! I think the answer here is to restore from their old backups, let them learn the improper backup lesson, and have them manually enter in the missing data.