Re: Migrating to DB2 from Postgres - Mailing list pgsql-admin

From shaunnx@my-deja.com (X)
Subject Re: Migrating to DB2 from Postgres
Date
Msg-id 6375fd1b.0109200440.557b94d3@posting.google.com
Whole thread Raw
List pgsql-admin
--Thanks for the reply:

--While trying to see if it's just the sheer size of the file, I
just created one table and put it into a sql file.  The statements
are semicolon delimited.

--I'm thinking that the files themselves are just too big.  I'm
trying to figure out options, hoping that just connecting to
the Postgres database (and ultimately, the mainframe DB2 server)
will help me in my quest.

--Still looking for documentation and books for this sort of thing.
Suggestions anyone?

-X


Larry Menard <lmenard@ca.ibm.com> wrote in message news:<3BA8FEEC.FC518299@ca.ibm.com>...
> The "-t" in your "db2 -tvf ..." command means that DB2 should use a
> termination character (default = semicolon, ";") to delimit statements in
> the input file... that allows a single statement to span multiple lines in
> a f ile.  Make sure the "database.sql" file does in fact have a semicolon
> (";") terminating each statement.
>
>    If the file contains source for triggers, they frequently use the "@"
> character as their termination character.
>
> X wrote:
>
> > Howdy:
> >
> > Apologies for cross posting.  I should warn you: I'm a novice at best.
> >
> > I have installed DB2 Universal Database version 7.1 (try and
> > buy version) for Linux (Intel box) on Mandrake 8 (kernel 2.4.10-pre8).
> > I also have Postgres version 7.1 running.  I want to migrate from
> > Postgres to DB2.
> >
> > As I'm trying to replicate the database from Postgres to DB2,
> > with Postgres, I can do: pg_dump -u database > databasefile.sql.
> > (The -u asks for the user, I type it in and away I go.)
> >
> > But when I try to create and populate the database on DB2
> > by: 'db2 -tvf databasefile.sql -z /tmp/db2_logfile', it *looks*
> > like it's working but after a few minutes, I get the message:
> >
> > 'DB21006E  The input command is too long. The maximum length is 65535.'
> >
> > Going back to DB2, if I type:
> >
> > db2=>connect to database
> > db2=>list tables
> >
> > I get a list of *some* of the tables, but by trying to describe
> > them, I see that all of the tables are empty.
> >
> > After examining the documentation, I did not find anything that
> > explains how to connect to other databases and replicate the
> > database.  Is there such a thing?  How can I connect to my
> > Postgres port and say, 'replicate database to DB2'?  Or, at least
> > is there a good DB2 book that walks me though some of this stuff.
> >
> > The Postgres and IBM website doesn't tell me anything useful.  Even
> > with the IBM / db2 documentation I downloaded, I come up empty.
> >
> > And all of this on the command line and NOT the DB2 Command Center.
> > The 'Command Center' keeps blowing up and giving some core failure
> > error.  That's another problem for another time.
> >
> > Any suggestions?
> >
> > TIA,
> >
> > -X

pgsql-admin by date:

Previous
From: David Stanaway
Date:
Subject: pg_dump fails
Next
From: "Dave VanAuken"
Date:
Subject: pgsql and SSL