I have a file with an extension .ib
. I am guessing it is either an Interbase or a Firebird file, but I am having trouble working out exactly which. Furthermore, it isn't clear exactly which version of Interbase (or Firebird) was used to create the file.
What I have found so far:
I have tried various different software to read this file (FlameRobin, Firebird's isql.exe and also the latest version of Interbase) and the error messages I get tell me the ODS ("On Disk Structure") is version 9. Which is quite old, and dates to around the time that Firebird was forked from Interbase.
I have managed to connect to the database and query it using Firebird, but some errors I'm getting lead me to believe it is actually an Interbase database (I can explain further if required)
Is there a fool proof way of determining exactly what sort of database I'm dealing with? i.e. is it an Interbase or Firebird file and if so which version was it written with?
Edit:
The output of gstat.exe -h
run using Firebird 2.5:
Database header page information:
Flags 0
Checksum 12345
Generation 7558
Page size 4096
ODS version 9.1
Oldest transaction 7506
Oldest active 7544
Oldest snapshot 7544
Next transaction 7549
Bumped transaction 1
Sequence number 0
Next attachment ID 5
Implementation ID 16
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 1
Attributes force write
Variable header data:
Sweep interval: 20000
*END*
To summarise:
gstat.exe -h
from the bin directoryYou can find your client software version by opening the menu item Help --> About. You can find your Firebird Server version by clicking the Check Firebird Version button in the Database Connection window using the menu option Tools --> Database Connection.
Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers.
By default, all Firebird internal files are stored in the same folder: on Windows it is C:\ProgramData\firebird, on Linux - /tmp/firebird.
From the answer to my comments regarding the Dialect used, I guess FlameRobin is using Dialect 3 when connecting to the database, which is the default dialect for new databases Read Dialect for more information on this matter. On the other hand, Dialect 1 is the default for legacy databases (older than IB 6.0).
in iSQL you can use the following sentences to make sure you are on Dialect 1. When you start iSQL:
isql -sql_dialect n
or inside a iSQL session:
SET SQL DIALECT n;
More info on iSQL and dialects here.
If this does not work then your best best is to get some old installation of Interbase 5.0, perform a gbak and restore the database with your Firebird 2.5 installation.
You could also try to ask on the Firebird mailing lists. There is one of them focused on Interbase database conversions.
EDIT: as stated by @mghie, the problem with FlameRobin probably is because it does not support ODS prior to 10.
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With