Export Firebird database to sql

2019-06-04 10:21发布

问题:

I have several databases in Firebird using IBExpert as the GUI admin. I am changing over to MySQL. I can use IBExpert to backup the database (which gives me the full structure and data) but the gbak format can't be read by phpMyAdmin. PhpMyAdmin has an export command that dumps the data and/or structure of the active database to an sql file. Is it possible to do something similar with IBExpert?

回答1:

You can use the FBExport tool to generate a dump with inserts. However I am not sure if it is still maintained and works with the latest Firebird versions (it says it was tested against Firebird 1.0 - 2.1).

See Export data from Firebird into pure SQL inserts/ export data from Firebird to MySQL for an example of how to use this tool:

$> FBExport.exe -D "c:\DB\WL.FDB" -U user –P password -Si -V TEST -F test.out

Where:
Si – means “export to SQL inserts” format
V – table name to export
F – output filename



回答2:

In IBExpert you can extract Metadata but it will be in Firebird SQL dialect so if you use generator or sequence you will have problem with MySQL which not support this.

The best way is to use tools like Database Workbench and use DataPump. There are many others tools which are able to make DataPump but I like this one.

CleverComponents also made one

Why changing to MySQL ?