Subject extracting schema & data
Author Jirka Hanika
Hello,

it so happens that I have to be able to extract some data from a variety
of DBMS's to a text form (SQL or CSV). I've been able to do this with
PostgreSQL, MySQL and .dbf databases, but now I'm pretty much stuck
with Interbase/Firebird. I'd very much appreciate any hints
what may be the usual ways for a similar task.

I've already investigated some approaches, but with no success.

For example, I know there is an -extract option to isql to extract the
schema (to a non-portable dialect of SQL). But no such tool seems to
exist to dump the data.

I tried to redirect the output of isql and to feed it a SELECT.
But unfortunately this prints out VARCHAR data in their declared, not
actual length. Even in Firebird 1.5 there is some padding always
attached, which makes the output rather clumsy to process. Using
RTRIM() to get rid of the padding fails with SQLCODE -802 - I have
no idea why. Perhaps isql is not meant to be used in scripting at all?

(In case third-party software is necessary, I prefer Linux-based options;
I've already tried a MS-Windows based thing named IB Milking Machine
with no success, and I need to automate the process anyway.)

Thanks for any hints.

Jirka