Subject Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
Author Helen Borrie
Hello Mark,

Saturday, October 15, 2016, 10:02:33 PM, you wrote:

> On 13-10-2016 11:43, Helen Borrie helebor@...
> [firebird-support] wrote:
>> 64-bit or 32-bit - does not matter. You should be able to open that
>> v.1.5 database with either Fb 1.5 or 2.0.6. You would probably get
>> some errors trying to open it in Fb 2.1 or 2.5. That has nothing to
>> do with 32-bit/64-bit but with changes in the on-disk structure.

> I thought there was a difference for 32 bit vs 64 bit if the database
> was ODS 11.0 or earlier.

Yes - I think you could be correct about that. My 2.5 server would not
connect to an old db I made for the 2004 ? conference. ("Not a valid
database...") An old WinXP laptop running Fb 1.5, that I keep for
customer work, was able to connect to it.

But I had a backup of it that was made under Fb 1.5 and was able to
restore it to ODS 11.2, as follows.-

(all in one command!)
# ./gbak -c /opt/databases/LeisureStoreDB/LeisureDBbackup/20040511.fbk
-user sysdba -password masterke -fix_fss_m ascii

made an alias in aliases.conf for the restored database:
newlstore = /opt/databases/LeisureStoreDB/ODS11_2/leisurestore.fdb

# opt/firebird/bin # ./isql newlstore -u sysdba -p masterke
Database: newlstore, User: sysdba

So I recommend that OP gets the Fb 1.5.6 kit from the Downloads
archive. We didn't have any 64-bit kits for 1.5, if you recall, so
that's not a complication. Make a gbak backup and test on that
installation that it restores OK.

Keep a copy of the backup file, run the uninstall script for Fb 1.5
and install the 64-bit Fb 2.5.

Restore the backup but, unless the default character set is NONE or
ascii, you will need to replace the -fix_fss_m argument with the
actual charset that was the default in the old db. That's a one-time
fix, needed because at v.2.1 text stored in metadata - such as CHECK
constraints and defaults - was changed from default charset to
UNICODE_FSS. If the default charset was already UNICODE_FSS you don't
have to do any fixing.

And, of course, on Linux you will already have a better SYSDBA
password than 'masterke'. ;-)