Migrate HSQLDB to Firebird in LibreOffice Base
This guide provides a straightforward walkthrough for migrating
legacy embedded HSQLDB databases to the Firebird engine within
LibreOffice Base. As LibreOffice transitioned its default embedded
relational database management system to Firebird, converting your older
.odb files ensures long-term compatibility, improved
performance, and access to modern SQL features.
Step 1: Create a Backup
Before initiating any database migration, create a secure copy of
your original .odb file. The migration process alters the
underlying database structure, and having a backup ensures no data is
lost if conversion issues arise.
- Close LibreOffice completely.
- Locate your
.odbfile in your file manager. - Copy and paste the file into a separate backup folder.
Step 2: Enable Experimental Features
In some versions of LibreOffice, the Firebird migration assistant is located under experimental features.
- Launch LibreOffice Base.
- Navigate to Tools > Options (on macOS: LibreOffice > Preferences).
- In the left panel, expand LibreOffice and select Advanced.
- Check the box labeled Enable experimental features (may be unstable).
- Click Apply and then OK.
- Restart LibreOffice if prompted.
Step 3: Run the Migration Assistant
- Open your legacy HSQLDB
.odbfile in LibreOffice Base. - LibreOffice will detect the legacy engine and display a prompt asking if you want to migrate to Firebird.
- Click Yes to launch the Database Migration Wizard.
- Review the migration summary screen detailing the tables, views, and data to be converted.
- Click Next and allow the wizard to convert your data structures and records.
- Once the conversion process completes, click Finish.
Step 4: Validate Data and Adjust Queries
Because HSQLDB and Firebird differ in SQL syntax, data typing, and function names, you must verify your database components:
- Field Types: Inspect your tables to ensure data
types (such as
VARCHAR,INTEGER, andBOOLEAN) converted accurately. - SQL Queries: Open and run all saved queries.
Firebird enforces stricter SQL standards than HSQLDB:
- String literals must use single quotes (
'text'). - Table and column identifiers containing special characters or mixed
casing must use double quotes (
"FieldName"). - Update any proprietary HSQLDB functions to their standard Firebird equivalents (e.g., date-formatting functions).
- String literals must use single quotes (
- Forms and Reports: Test all forms, subforms, and reports to confirm that control bindings and macro triggers function correctly with the new backend.
Step 5: Save the Converted Database
After verifying that all queries, forms, and data records operate
without errors, click File > Save
to finalize the migration. Your .odb container is now fully
running on the embedded Firebird engine.