Subject Re: Migrating database from MS SQL or PostgreSQL
Author Andreas Tille
On Thu, 17 Aug 2000, Helen Borrie wrote:

> True: they are reserved words (also in Delphi, if you were thinking of
> using your database with that, which means also Kylix).
>
> However, in IB 6 you can use reserved words as object names, provided you
> include them inside double quotes. This will cause the names to become
> case-sensitive, something you would have to watch for and repair if you
> have existing applications containing SQL strings.
I think it would be best to change the names because I don't want to
use quotes in the future.

> How you approach may depend on the type of data you have. The fastest and
> most generic way is to output the source data to fixed-length text files,
> create external tables in your IB database to read them and then write a
> script to convert the data and insert it into the destination tables.
>
> With this method, of course you will get stuck if you have blobs.
I do have some longer texts which I thought I have to insert as blobs.
MS SQL server and PostgreSQL have the type "text" which seems to be
not implemented in InterBase, thought.

> There are Windows-based tools around which can pump data from one format to
> another, e.g. the Freeware IB_WISQL tool from www.ibobjects.com. It should
> be possible to find an intermediate format which that pump can handle.
I've just downloaded this tool but strangely enough it hasn't any field
to insert the server InterBase is running on (Linux server). Does this
thing only work on local databases? Moreover how to pump this stuff?

> I don't know of a tool that can pump directly from M$SQL to InterBase,
> other than the BDE's TDatapump (if you have a client/server Delphi) - with
> that you can write a simple application and pump to an IB 5.x
I have neither Delphy nor IB 5.x. I used Access with PostgreSQL ODBC
driver to convert the data to PostgreSQL. There were rumors about
a Beta-ODBC driver. Do you think it could work this way?

> database. (it's slow, but it gets you there!) After that, 5.6 to 6 is
> dead easy - a simple matter of using the 5.x gbak program to back up the
> database in transportable format; and then restoring that backup to 6
> using the 6 version of gbak.
Once you mention gbak: I've tried to use "Backup" from IBConsole 1.6
which seems to call gbak. The console-output seemed reasonable, but
finaly I didn't found the file the output should go. There wasn't just any
new file in my filesystem :-(. That's quite strange!
Moreover I wanted to use the Linux gbak. Where can I find a description
of its syntax? There isn't any manpage.

> If these don't work for you but you do find something that does work, we
> would highly appreciate your coming back here and telling us what you
> did. We are trying to build up a How-To here. You might like to look back
> through the archives of this list at
> http://www.egroups.com/messages/ib-conversions to see what's already been done.
I'll do so.

Thanks for your hints

Andreas.