Subject Re: [firebird-support] FB to SQL Server
Author Milan Babuskov
Chad Z. Hower aka Kudzu wrote:
> But I need an easy way to take my FB DB and export it to a new SQL DB. I
> just need the schema, but data would be nice too.
> Also I need it to be automatic - not a case tool or something. Something I
> can just run and poof it deletes the old SQL DB, then reads the FB ones and
> makes "copy" in SQL Server.

You could use isql -x to export Firebird's DDL statements. Depending on
dtabase structure, you may need to write a simple parser to find&replace
datatypes, remove triggers and stored procedure code and other things that are
different. Then, use the .sql script you got to build new SQL DB.

To pump the data automatically, you could use FBExport and "export as SQL
statements" functionality to create script with INSERT statements. This method
is not optimal, since each insert statement is prepared when importing to SQL
DB. Alternatively, you could export to CSV as I believe SQL Server has some
command-line tool to import CSV data. If you are familiar with it, you could
write a 60-line PHP script to do the pumping properly and quickly (select +
executing prepared insert).

It's not too hard to have tables and data, but everything above that is
complex to automate.

--
Milan Babuskov
http://fbexport.sourceforge.net