0

We have a database with a data file exceeding 2Gb, this resulted in a .^01 file being generated with the same file name. We now have a .DAT file and a .^01 with the same name. I have subsequently deleted the unnecessary data (old history, no longer required) and the .DAT file is now only 372MB, but the .^01 file remains. I would like to clone the .DAT file and save the data and reload it into the cloned (blank file. I normally use Butil (Clone, Save and Load) but am unsure what I need to do with the .^01 file as the Butil -Save FileName.^01 FileName.seq returns an error as it does not recognise the ^: BUTIL-14: The file that caused the error is FileName.01. BUTIL-100: MicroKernel error = 12. The MicroKernel cannot find the specified file.

I would greatly appreciate some direction/input in this regard Thank you and kind regards,

1 Answers1

0

You don't need to do anything with the .^XX file(s). They are called Extended files and are automatically handled by the PSQL engine. A BUTIL -CLONE / -COPY will read all of the data (original file and extended file(s)) and copy it to the new file.
To rebuild it, you should do something like:

BUTIL -CLONE <NEWFILE.DAT> <OLDFILE.DAT>
BUTIL -COPY <OLDFILE.DAT> <NEWFILE.DAT>

Also, if the file grows above 2GB again, the Extended File (.^01) will come back.

mirtheil
  • 8,952
  • 1
  • 30
  • 29
  • see also: [Why is the performance setting 'Limit segment size to 2GB' checked by default?](https://communities.actian.com/s/question/0D53300003rfbieCAA/why-is-the-performance-setting-limit-segment-size-to-2gb-checked-by-default) You can change the setting, which will stop creating `^01` files. To reduce file size, after deleting records, a rebuild is always needed (AFAIK) – Luuk Apr 16 '22 at 11:43