I have an InterBase / Firebird database file of an old project for which I lost the credentials. Some information about the database, dumped with the
gstat command, is shown below . I'm accessing this file as an embedded database, i.e., without a running instance of Firebird. I'm on MacOS and I've Firebird 2.5 installed, since On-Disk Structure (ODS) 11.2 corresponds to this version.
I'm able to export the database structure using the
isql command, but I'm unable to access any data using this tool without a valid username and password, resulting in the following error message:
Error while preparing SQL statement: - SQLCODE: -551 - no permission for read/select access to TABLE FILES', -551, 335544352
Providing the default SYSDBA/masterkey as the username/password results in the error message:
Error while connecting to database: - SQLCODE: -902 - cannot attach to password database', -902, 335544653
Since encryption was introduced in the newer Firebird 3 and the data is stored unencrypted (I can view the data with a hex editor) I'd assume there is a way to access this data without credentials and make an export. How can I do so?
: Output of the
Database "./DATABASE.GDB" Database header page information: Flags 0 Checksum 12345 Generation 26450714 Page size 4096 ODS version 11.2 Oldest transaction 25058616 Oldest active 25058617 Oldest snapshot 25058617 Next transaction 25058619 Bumped transaction 1 Sequence number 0 Next attachment ID 1401189 Implementation ID 26 Shadow count 0 Page buffers 0 Next header page 0 Database dialect 1 Creation date Jul 21, 2014 13:42:21 Attributes force write Variable header data: Sweep interval: 20000 *END*