By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,334 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,334 IT Pros & Developers. It's quick & easy.

Migrating PostgreSQL to DB2

P: n/a
Folks,

I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if
you must know). I've searched the web and can't find any guide to migrating
from PostgreSQL to DB2, even on the IBM web site.

This is my first crack at migration, and to make matters worse, this is
my first exposure of any kind to PostgreSQL. Does anyone have any pointers
they could share?

Most immediately, I know more-or-less what the following PostgreSQL
statement does, but I'm not sure what the DB2 equivalent would be:

CREATE AGGREGATE BIT_OR
(
basetype = bit,
sfunc = bitor,
stype = bit
)

What would DB2's equivalent of this be? A UDF?

Thanks in advance for any help.
--
--------------------
Larry Menard
"Defender of Geese and of All Things Natural"

Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In article <Ap********************@rogers.com>, Larry Menard
(ro**@GoSpamYourself.com) says...
Folks,

I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if
you must know). I've searched the web and can't find any guide to migrating
from PostgreSQL to DB2, even on the IBM web site.

This is my first crack at migration, and to make matters worse, this is
my first exposure of any kind to PostgreSQL. Does anyone have any pointers
they could share?

Most immediately, I know more-or-less what the following PostgreSQL
statement does, but I'm not sure what the DB2 equivalent would be:

CREATE AGGREGATE BIT_OR
(
basetype = bit,
sfunc = bitor,
stype = bit
)

What would DB2's equivalent of this be? A UDF?

Thanks in advance for any help.


You might find some usefull info in this developerswork article:
http://www-128.ibm.com/developerwork...echarticle/dm-
0504greenstein/
Nov 12 '05 #2

P: n/a
Hi !

Gert van der Kooij <ge**@invalid.nl> schrieb:
I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if


Why are you doing that ? :-)

This no flame-question, I'm really interested which in which aspects
DB2 is the the better choice if you already have such a powerful DBMS.

Best regards

Marc Schoechlin
--
I prefer non-proprietary document-exchange.
http://sector7g.wurzel6.de/pdfcreator/
http://www.prooo-box.org/

Nov 12 '05 #3

P: n/a
In article <sl********************@256bit.org>, Marc Schoechlin
(ms*****@256bit.org) says...
Hi !

Gert van der Kooij <ge**@invalid.nl> schrieb:
I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if


Why are you doing that ? :-)


Hi Marc,

You are talking to the wrong one. I did't want to port an
application, Larry asked the question.

kind regards, Gert
Nov 12 '05 #4

P: n/a
Marc Schoechlin wrote:
Gert van der Kooij <ge**@invalid.nl> schrieb:
I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if


Why are you doing that ? :-)

This no flame-question, I'm really interested which in which aspects
DB2 is the the better choice if you already have such a powerful DBMS.


Mark,

Postgresql is a cool little database. My shop tries to use it in place
of mysql whenever an open source database is used (usually for an
open-source application). It's prefered over mysql because it is so
much more mature: views aren't in a development release like they are
in mysql, they've been there for years, the optimizer is more than six
lines of code, etc, etc.

However, we still migrate databases from postgresql to db2 all the
time. The reasons include:
- minimize labor costs and improve admin/developer effectiveness:
- focus developers on a single database - which helps them in
their training on advanced sql, performance tuning, locking,
etc
- focus admins on a single database - which again helps with
all developer eduction; plus backups, auditing, configuration,
etc.
- enables greater sharing of resources as well as some dba
outsourcing
- handle large data volumes
- postgresql has no query parallelism capability to help with table

scans
- postgresql has no range partitioning to minimize impact of table
scans (tho union-all views or the like are in the works)
- postgresql has no hash partitioning to spread query across more
cpus
- postgresql has very primitive memory tuning (just one buffer
pool)

So, we end up saving quite a lot in labor, are able to outsource some
of our admin to a db2 group, and are able to get better performance out
of the same hardware with db2. The only downside is the licensing cost
- but there are many low-cost db2 licenses available to reduce this
impact anyway.

buck

Nov 12 '05 #5

P: n/a
What I'm doing is adding DB2 support to a SourceForge package
(http://sourceforge.net/projects/gallery) that already supports PostgreSQL,
MySQL, and Oracle (though I suspect their Oracle support doesn't work).
Doing so will make this package more attractive to DB2 users, and provides
DB2 with another application in its portfolio.
--------------------
Larry Menard
"Defender of Geese and of All Things Natural"
"Marc Schoechlin" <ms*****@256bit.org> wrote in message
news:slrndkla3u.de5.ms*****@256bit.org...
Hi !

Gert van der Kooij <ge**@invalid.nl> schrieb:
I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32,
if


Why are you doing that ? :-)

This no flame-question, I'm really interested which in which aspects
DB2 is the the better choice if you already have such a powerful DBMS.

Best regards

Marc Schoechlin
--
I prefer non-proprietary document-exchange.
http://sector7g.wurzel6.de/pdfcreator/
http://www.prooo-box.org/

Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.