From: shaunnx@my-deja.com
To: pgsql-admin@postgresql.org.pgsql-general
Subject: Re: Migrating to DB2 from Postgres
Date: 20 Sep 2001 05:40:09 -0700
Message-ID: <6375fd1b.0109200440.557b94d3@posting.google.com> (raw)
References: <6375fd1b.0109191116.15cb89cf@posting.google.com>
<3BA8FEEC.FC518299@ca.ibm.com>
--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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: shaunnx@my-deja.com, pgsql-admin@postgresql.org.pgsql-general
Subject: Re: Migrating to DB2 from Postgres
In-Reply-To: <6375fd1b.0109200440.557b94d3@posting.google.com>
References: <6375fd1b.0109191116.15cb89cf@posting.google.com> <3BA8FEEC.FC518299@ca.ibm.com> <6375fd1b.0109200440.557b94d3@posting.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox