Possible Corruption in betrieve .dat extension files (.^01)

Posted on 2007-07-24
Last Modified: 2013-12-25
i have a 3rd party application that uses pervasive database. One of the files in the database is growing way tooo much with all the data that needs to be in there, and apparently now has 3 extension files.

recently the application started crashing with error I/O 103. I looked it up and it says that the error is data chunk off set error.

i tried to re-index this huge file but i wont let me because of the exentsions. the butil command goes beserk when dealing with extension files and there is no utility out there that would help me re-index this file.

also when the app is loading it shows the following error in the log file...
System Error: 116.12.0 File: FileLocation

The actual database is Pervasive Version 9.11, but all the .dat files are of version 7.0 !! i would want to convert the files to version 9.0 as well but am not sure how to with extension files being involved. could that be the problem as well??

My first guesss is the file is corrupt but is there any way i can bring it back up ?/? any help would be greatly appreciated.....

thanks a lot in advance....
Question by:PremkumarBalwani
    LVL 18

    Expert Comment

    >>i tried to re-index this huge file but i wont let me because of the exentsions. the butil command goes beserk when dealing with extension files and there is no utility out there that would help me re-index this file.

    What do you mean?  What error were you seeing?  Were you trying to rebuild each extension file individually?   You don't need to do that.

    Rebuilding to the V9 format won't necessarily give you any extra prevention from corruption.   To rebuild the files, you should use the Rebuild utility (either the command line or the GUI version).

    In regards to the 103 error, how is the file being accessed?  Is it through Btrieve or ODBC/SQL?  If it's ODBC/SQL, the problem may be related to incorrectly defined DDFs.  
    LVL 1

    Author Comment

    Thanx for the quick reply mirtheil.....

    i tried to do a rebuild using the gui that comes with Version 9..... and it is the log info....
    /////*************** LOG FILE INFO *******///////////////////////
    The rebuild operation start time is 07/25/07 00:24:18.
    rbldcli -c -s -f9  C:\noble\ND60\NHWTRX.DAT

    REBUILD-20: The utility is processing C:\noble\ND60\NHWTRX.DAT.
    REBUILD-68: Status code 2 was returned while copying records from the following file:
    REBUILD rejected a total of 1285637 records.
    REBUILD copied a total of 619136 records.
    REBUILD rebuilt a total of      0 indexes.
    The rebuild operation end time is 07/25/07 00:40:11.
    /////////***************LOG INFO ENDS HERE**********************////////////////////

    what i meant by butil (re-indexing) the file is, i have a .TAD file which is basic indexed structure of the actual file

    i usually back up the actual content of the current file...
    file.DAT to file_back.DAT

    and then run a copy command to create a clean structure of the table...
    copy file.TAD file.DAT

    and then run a butil -copy command to load the data into this newly created structure...
    butil -copy file_back.DAT file.DAT

    when i run that.... it sort of re-indexes the file.. but for the file in question it stops at record # 619136 and then returns a microkernal error # = 2 ....... which is exactly the same as the log file....

    Any ideas as to how i can fix this issue???

    thanx a lot in advance...
    LVL 28

    Accepted Solution

    You really should be using the "Recover" process, not the Rebuild tool.  For a description of this, please see the white paper on Btrieve Data File Management here:

    If the file is truly damaged, then recovery from backup is your best bet.  If this is not feasible, then there are companies that provide professional repair services that may be helpful to you.
    LVL 18

    Assisted Solution

    Bill's got a point.  With the status 2, using the "Rebuild" tool won't help. You'll need to use the Recover process.  
    LVL 28

    Expert Comment

    by:Bill Bach
    A few other things I noticed when rereading your original post:

    1) PSQLv9.1 did have some bugs that caused substantial file growth under certain conditions, specifically apps that rapidly open the file, insert a record or two, and then close the file right away.  Patching to PSQLv9.5 (a.k.a. Service Pack 2) should help alleviate this issue.

    2) Do not worry about getting the files to 9.x format just yet -- get the problem file dealt with first.  When done, you'll be able to use the Rebuild tool properly to rebuild the files and upgrade the file format.  When you move to the 8.x or newer format, you will see a performance gain, so it is a good idea to do so.
    LVL 28

    Expert Comment

    by:Bill Bach
    Is this issue still open, or can we close it?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now