Btrieve and Pervasive PSQL: how to identify it and get your data out
How to tell if your business system runs on Btrieve, what the .dat and DDF files mean, and four ways to extract the data, even with no record layout.
How to tell if your business system runs on Btrieve, what the .dat and DDF files mean, and four ways to extract the data, even with no record layout.
Who this is for
Anyone running a business system from the 1990s or 2000s whose vendor has disappeared, or who has been told the data is locked in a format nothing can read.
Question this answers
How do I find out whether my system uses Btrieve, and can the data actually be recovered?
What you'll leave with
Most people do not know they have Btrieve. It is rarely the product anyone chose. It is the storage engine underneath the accounting package, the dealership system or the manufacturing software that somebody bought in 1996, and it only becomes your problem when the vendor stops answering the phone.
This guide covers how to establish whether you have it, what the files mean, and what your realistic options are for getting the data out. It is written so that you can do the identification yourself, because that is the part where most people get stuck and it does not require anybody to be paid.
You are looking for four kinds of evidence. Any one of them is a strong indicator.
Find the folder your application keeps its data in. Btrieve data files usually carry one of these extensions:
.dat is the most common, and also the most ambiguous, because plenty of other systems use it.btr is unambiguous and tells you immediately.mkd appears in some installations, from MicroKernel DataThe giveaway is not the extension on its own, it is the shape of the folder: dozens of files, each one representing what a relational database would call a table, with no single database file tying them together.
Look in the application folder and in the Windows system folder for any of these. They are the Btrieve client libraries, and their presence is close to conclusive:
w3btrv7.dllwbtrv32.dllw1btrv7.dll
Open the services list on whichever machine holds the data. You are looking for
a service named Pervasive PSQL, Actian Zen,
or an executable called w3dbsmgr.exe. If one of those is running,
the engine is installed and something is using it.
Sometimes the only clue is a single file. In one client codebase the entire
indication was a file named BTRIEVE.PFI, sitting among the source
of a 4GL application whose owner had no idea Btrieve was involved at all. If
you have source code, search it for the word "btrieve" and see what comes back.
A quick check that costs nothing. Open a data file in a hex editor or even Notepad. Btrieve files begin with a recognisable file control record rather than readable text, and you will typically see your actual data in fixed-width columns further in, with the same field appearing at the same offset in every record. That regularity is the fixed-length record structure, and it is the thing that makes recovery possible.
This is the part that catches people out, including developers. Btrieve is not a relational database. It is a key-indexed record manager, sometimes described as an ISAM engine. It stores records of a fixed length and maintains indexes over them, and that is very nearly all it does.
What it does not do is know what your data means. A Btrieve record is a run of bytes. The knowledge that bytes 0 to 5 are a customer code, bytes 6 to 45 are a name, and bytes 46 to 49 are a packed decimal balance, lives in the application, not in the database.
That single fact explains almost everything people find confusing about Btrieve:
SELECT * FROM customers unless something has been added to provide itIt also explains why Btrieve was popular. Skipping the relational layer made it extremely fast on the hardware of the time, and reliable enough that a great many systems built on it have run for thirty years without corruption.
The engine has been renamed twice and changed owner several times, so searching the internet returns three products that appear unrelated but are the same lineage:
| Era | Name | What you might see |
|---|---|---|
| 1980s to mid 1990s | Btrieve | Btrieve 5.x, 6.15, Novell Btrieve |
| Late 1990s to 2000s | Pervasive | Pervasive.SQL 7, Pervasive.SQL 2000, Pervasive PSQL v8 to v13 |
| 2013 onward | Actian Zen | Actian Zen v14, v15 and later |
If your vendor's documentation mentions Pervasive and your server is running something called Actian, those are the same product a decade apart. This matters practically: current Actian Zen will generally still open data files created by much older Btrieve versions, which is frequently the cheapest first move available to you.
Look in your data folder for three specific files:
FILE.DDFFIELD.DDFINDEX.DDFThese are the Data Dictionary Files. They are the relational layer that Btrieve itself does not have, and they map the raw byte offsets in each record to named, typed fields. Some vendors shipped them, many did not, and some shipped them and then let them fall out of date as the application changed.
If the DDFs are present and accurate, your position is good. The data can be read through ODBC or SQL as though it were an ordinary database, with real column names, and a competent extraction becomes a day or two of work rather than a project.
If the DDFs are missing, the record layout has to be recovered from somewhere else, usually the application source code. This is slower and it is still entirely solvable. It is not a reason to be told the data is unrecoverable, and if somebody has told you that, they most likely meant that they personally could not do it.
Do not trust DDFs you have not verified. Out-of-date dictionary files are worse than absent ones, because they produce an extraction that looks correct and is silently wrong in the fields that changed. Always reconcile the output against a report the business already runs and already trusts.
Where the dictionary files exist, the current engine exposes the data through ODBC with named columns. From there it is ordinary work to pull every table into SQL Server or PostgreSQL. This is the cheapest route by a wide margin and it is the first thing to check for.
Btrieve ships a maintenance utility called butil. It can unload the
contents of a file without needing DDFs at all. What it gives you is the raw
records, correctly separated but without field names or types, so you still need
the record layout to make sense of the result. Useful as a safety copy and as a
way to prove the files are readable before committing to anything.
If you have source code, the record definitions are in it. Every language that talked to Btrieve had to declare the record structure somewhere in order to read it. Find those declarations and you have the map. This is the route we most often end up taking, and it is methodical rather than clever.
Worth one phone call. Some vendors will provide an export or the record layouts on request, particularly if you are leaving and they would rather part on good terms. It costs an hour to ask and occasionally saves a fortnight.
These are the specific ways a Btrieve extraction produces output that looks fine and is not. Every one of them is worth checking explicitly.
The defence against all five is the same and it is not technical sophistication. It is reconciliation: take a report the business runs every month, and prove the extracted data reproduces it exactly before anybody relies on the result.
In order, and the first three cost nothing:
The thing worth understanding is that Btrieve data is recoverable. The format is documented, the engine still exists and still opens old files, and the record layouts are either in the DDFs or in the application. When somebody tells you the data is locked away forever, what they are usually telling you is that they have never seen it before.
Meet the person
This guide comes from real projects. If it raises a question about your own system, you can ask the founder directly.
HELLO PEOPLE designs, builds and looks after AI, software, app and data solutions for Australian businesses, with senior expertise on every project and a scope agreed before work starts. For an older system, that means learning what it really does first, so nothing your business relies on is lost.
Since 2007, HELLO PEOPLE has delivered more than 100 projects from Perth for small and medium businesses across Australia: custom software and apps, system integrations, data migrations, reporting and dashboards, and AI that works inside the systems a business already runs.
I lead every engagement myself. I trained in accounting before moving into IT, hold accounting and IT professional qualifications and an MBA, and bring more than 20 years of experience across sales, service delivery, inventory and compliance. I am also a PhD candidate in AI at Curtin University, researching retrieval-augmented generation (RAG), so the technology is always judged by what it does for the business.
Small and boutique. The person who scopes the work is the person who does it, and the same person is there when the old system is switched off.
No ticket queue and no account manager in between. You hear back within one business day, usually sooner.
The upgrade is the start, not the end. When you need the next system, integration or report, you call the same person, who already knows your business.
Ask the author
Ask it here and it comes straight to Kasun, who wrote this. No sales call, no obligation, and a real answer even if the answer is that you do not need us.
Kasun Wijayamanna
Founder, replies within one business day
Tell us what you are comparing, replacing, or trying to improve. We will come back with a practical recommendation and realistic scope.
Built here. Your data stays here.
Thanks for reaching out. We will get back to you within one business day.
See what else we do