Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
Hello Mark, Saturday, October 15, 2016, 10:02:33 PM, you wrote: > On 13-10-2016 11:43, Helen Borrie hele...@iinet.net.au > [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 /opt/databases/LeisureStoreDB/ODS11_2/leisurestore.fdb -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 SQL> 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'. ;-) Helen
Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
On 13-10-2016 11:43, Helen Borrie hele...@iinet.net.au [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. Mark -- Mark Rotteveel
Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
> On Oct 13, 2016, at 4:37 AM, Urs Liska fireb...@openlilylib.org > [firebird-support]wrote: > >> Am 13.10.2016 um 10:18 schrieb Elmar Haneke el...@haneke.de >> [firebird-support]: >> >> > 1) >> > I assume on LInux (Debian based Mint version and an Ubuntu flavor) I >> > install a variant of the server (in the repository I find the 2.5 >> > variants, but I'd be also happy installing a downloaded 3.0 >> > instead). >> > Then I need a generic DB manager like e.g. Flamerobin to do general >> > operations and basic DB editing. Or is it equally possible to do that in >> > the terminal? >> > >> > Is that correct? >> >> That's mostly correct. 64Bit Firebird might be unable to open old >> database - I came to tha Problem with an FB 1.5 database moving to FB 2.5. >> >> In that case you have to install either 32Bit package or an old package. >> >> > 2) >> > How can I determine the version of my existing database file? And how >> > can I convert that to a current one in the expected case it isn't >> > compatible with my current installation? There is only the .fdb file and >> > no backup available. >> >> Once accessible FlameRobin can tell you the version of datafile. >> >> To convert to current database you have to create an backup and restore. >> >> Elmar > > So that boils down to having to try out different versions of Firebird until > I find one that can open the DB? > Try gstat -h. It should tell you the version of the database file even if the seever won't open it. Good luck, Ann > > Posted by: Urs Liska > > > ++ > > Visit http://www.firebirdsql.org and click the Documentation item > on the main (top) menu. Try FAQ and other links from the left-side menu > there. > > Also search the knowledgebases at > http://www.ibphoenix.com/resources/documents/ > > ++ > > > > VISIT YOUR GROUP New Members 3 > • Privacy • Unsubscribe • Terms of Use >
Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
Hello Urs, > 1) > I assume on LInux (Debian based Mint version and an Ubuntu flavor) I > install a variant of the server (in the repository I find the 2.5 > variants, but I'd be also happy installing a downloaded 3.0 instead). > Then I need a generic DB manager like e.g. Flamerobin to do general > operations and basic DB editing. Or is it equally possible to do that in > the terminal? > Is that correct? > >That's mostly correct. 64Bit Firebird might be unable to open > old >database - I came to tha Problem with an FB 1.5 database > moving to FB 2.5. > >In that case you have to install either 32Bit package or an > old package. 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. BTW, Flamerobin is a useful tool but all Firebird packages come with the isql utility, which runs in the command shell. You just have to make sure you run it from its own bin directory with ./ because there are other DBMS out there that have their own [incompatible] binaries with the same name. > > 2) > How can I determine the version of my existing database file? And how > can I convert that to a current one in the > expected case it isn't > compatible with my current installation? There is only the .fdb file and > no backup available. Start by downloading and installing the Fb 1.5.6 tar.gz kit from http://www.firebirdsql.org/en/firebird-1-5/#Linux_x86 ... Put the database file somewhere on the physical filesystem of the host machine. Use the gbak utility to take a backup which can be restored to a higher ODS. > >Once accessible FlameRobin can tell you the version of > datafile. You don't need Flamerobin for that. In the same directory, do ./gstat -h /path/to/database and look for the item "ODS version": 10.0 means it was created under Fb 1.0 10.1 """ Fb 1.5 11.0 """ Fb 2.0 11.1 """ Fb 2.1 11.2 """ Fb 2.5 After taking your gbak backup, decide which version you want to upgrade to. At both 2.0 and 2.1 there were changes that need repair when you restore the database, so read the release notes, especially the installation and migration document, which is common to both major versions. > So that boils down to having to try out different versions of > Firebird until I find one that can open the DB? Only if you want to! ;-) I would start with 1.5 so you have a good backup to work with. If you decide to go straight to 2.5, read the release notes thoroughly; but also get PDF release notes and installation docs for 2.0 and 2.1 from the Documentation zone. Particularly look at the gbak -c[reate] options for fixing data and metadata. because you will still need to do those fix options when you upgrade from the v.1.5 backup to Fb 2.5. I'd also recommend studying all the scripts that are in the tarball kit when you decompress it. When you get back "in the groove" you might consider doing the upgrade to Fb 3. -- Kind regards, Helen Borrie
Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
13.10.2016 10:37, Urs Liska fireb...@openlilylib.org [firebird-support] wrote: > So that boils down to having to try out different versions of Firebird until > I find one > that can open the DB? No, you can use gstat from FB 2.5 to see ODS version in database header and derive right FB version from it. Or you can just use FB 2.5 for the file migration as it can read most of old databases. -- WBR, SD. ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
> 1) > I assume on LInux (Debian based Mint version and an Ubuntu flavor) I > install a variant of the server (in the repository I find the 2.5 > variants, but I'd be also happy installing a downloaded 3.0 instead). > Then I need a generic DB manager like e.g. Flamerobin to do general > operations and basic DB editing. Or is it equally possible to do that in > the terminal? > > Is that correct? That's mostly correct. 64Bit Firebird might be unable to open old database - I came to tha Problem with an FB 1.5 database moving to FB 2.5. In that case you have to install either 32Bit package or an old package. > 2) > How can I determine the version of my existing database file? And how > can I convert that to a current one in the expected case it isn't > compatible with my current installation? There is only the .fdb file and > no backup available. Once accessible FlameRobin can tell you the version of datafile. To convert to current database you have to create an backup and restore. Elmar
[firebird-support] Reviving an old firebird database (file conversion/programming hints)
Hi all, after something like a decade I would like to revive an old Firebird database that I found on an old drive and need some starters to get me going. *Then* I developed it on Windows XP and mainly edited it using a generic DB management tool of which I forgot the name (it was a commercial product with a free student's license). Now I'm working on LInux exclusively and have a number of questions: 1) I assume on LInux (Debian based Mint version and an Ubuntu flavor) I install a variant of the server (in the repository I find the 2.5 variants, but I'd be also happy installing a downloaded 3.0 instead). Then I need a generic DB manager like e.g. Flamerobin to do general operations and basic DB editing. Or is it equally possible to do that in the terminal? Is that correct? 2) How can I determine the version of my existing database file? And how can I convert that to a current one in the expected case it isn't compatible with my current installation? There is only the .fdb file and no backup available. Could you give me some hints on libraries or other tools to start developing for/with Firebird again? I'd first like to write a usable interface to that existing database and then maybe restart using Firebird as a backend for further applications. I'd be happy to use Python, especially PyQt, and/or Node.js/AngularJS for creating a web frontend. Thank you for any pointers Urs