Extension file.

Last post 10-20-2010 4:02 AM by Fraser Scott. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-18-2010 4:06 AM

    Extension file.

    I get the following from a butil -stat on my file

     

    Btrieve Maintenance Utility 9.52.063.000
    Copyright (C) Pervasive Software Inc. 2007
    All Rights Reserved.

    File Statistics for htfil121.dat

    File Version = 8.00
    Page Size = 4096
    Page Preallocation = No
    Key Only = No
    Extended = Yes
    Extension Filename List:
    C:\MAGIC940\DATA\V5.0\BARNSDALE\HTFIL121.^01

    Total Number of Records = 367655
    Record Length = 76 
    Record Compression = No
    Page Compression = No
    Variable Records = No

    My query is why do I have a file extension and how do i get rid of it. I have all ready tried a rebiuld, but get an status code 43. When I try and run maintenance I get an error #2 when saving the data to an SQL file.

    I can browse the file file with out app but if i remove the Extension file I get a status code 43. 

     Any ideas on how to get rid of the extension file would be most appreciated.

     

    many thanks

    Fraser

  • 10-18-2010 6:20 AM In reply to

    Re: Extension file.

     You have an extension file because your file is larger than 2 GB and it split.  You don't want to get rid of it. 

    Your application and tools don't deal with the extension file.  They only need to deal with the main (htfil121.dat) file. 

    Here's what the docs say:

    Large Files
    The transactional interface supports file sizes up to 256 GB for Pervasive PSQL 9.5 or later (128 GB for earlier 9.x versions and 64 GB for other earlier versions). However, many operating systems do not support single files this large. In order to support files larger than the operating system file size limit, the transactional interface breaks up large files into smaller files that the operating system can support. A large, logical file is called an extended file. The smaller, physical files that comprise an extended file are called extension files. The base file is an original data file that has become too large to support as a single, physical file. Non-extended (that is, non-segmented) files provide more efficient I/O and, therefore, increased performance.
    You can choose to not to automatically extend Pervasive PSQL 9.x files or later at 2 GB. To change the segment operation setting access the configuration settings in the Pervasive PSQL Control Center (PCC) as described in Configuration Through PCC in Advanced Operations Guide. From there you can set the Limit Segment Size to 2 GB option.
    If this option is unselected, Pervasive PSQL 9.x files will not be segmented automatically at 2 GB. Version 8.x and earlier data files will continue to be extended when they reach 2 GB. If your files are already extended, they will remain segmented.
    Regardless of the configuration setting, all files will continue to be extended based on the file size limitations of the current operating system.
    From: http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=prog_gde/fundmnts.4.4.html

     

  • 10-18-2010 6:57 AM In reply to

    Re: Extension file.

    Hi Mirtheil,

     

    The file is only 84MB (84088KB). I was advised of this before so did check.

     

    regards

    Fraser

     

     

     

  • 10-18-2010 7:08 AM In reply to

    Re: Extension file.

     Was it larger at one point?  I've not seen an extension file for an 84 MB file before.

  • 10-18-2010 7:27 AM In reply to

    Re: Extension file.

    Hi There,

    As far as I am aware it has never been any larger that 84mb.

     

    regards

    Fraser

  • 10-18-2010 3:23 PM In reply to

    Re: Extension file.

    Do you get any errors extracting from the file via butil:

    butil -save htfil121.dat htfil121.seq

    Are all 367655 records extracted?

  • 10-19-2010 3:19 AM In reply to

    Re: Extension file.

    Hi Jay,

    It saves 365791 records then I get :-

    BUTIL-14: The file that caused the error is htfil121.dat

    BUTIL-100: Microkernel error = 2. The application encountered an I/O error.

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

     

    Thanks

    Fraser

  • 10-19-2010 7:52 AM In reply to

    Re: Extension file.

    The file is corrupted.  You could try the following:

    butil -recover htfil121.dat htfil121.rcv /I /J

    The recover command will read through the file forward until it hits the corruption then run through it backwards until it hits corruption.  With luck you will only have one record that is corrupted.  After that, if you clone the htfil121.dat file (make sure your engine settings have the file version set to the v8 if you want to keep the original version) you could import (butil -load or butil -save) the recovered records into it

  • 10-20-2010 4:02 AM In reply to

    Re: Extension file.

    Hi Jay,

     

    Thanks for the tip that worked, but I lost 235 records. Now I need to see if I can find what records it lost.

    Many thanks

    Fraser 

Page 1 of 1 (9 items)