This is how I would try to do it using my own tool.
Copy your database to a dedicated directory.
Install the Python script from
viewtopic.php?f=21&t=86071 and run it against the new, empty db
without adding a new hsqldb driver. It will create a subdirectory "database" with all the database files. The database document will be connected to that external database using the hsql driver of your office suite.
Now you can do all the operations in the database directory and you can use Base menu: Tools>SQL... as a command line interface.
If you see all the tables and relations, the operation was successfull.
For maintainance run SHUTDOWN COMPACT; and close the office suite for now.
Now it should be possible to "transplant" the repaired database back into the old Base document with your queries, forms and reports but I would never do that for the reasons you already know yet.
--------------------------------
The Python macro has a helper routine which allows you to remove the embedded database. You can do this manually as well when the database is closed.
---------------------------------
Upgrade to HSQL2 if you want:
Make a backup copy of the database folder.
Download the HSQL2 package from hsqldb.org (just another zip file), create a subdirectory "driver" in your database folder, copy or link lib/hsqldb.jar into this driver folder.
Run my Python macro and choose to connect with the existing external database again. It will include the existing driver/hsqldb.jar
Test your database. In some cases there may be compatibility issues which are resolvable.