Unix Technical Forum

Migrating PostgreSQL to DB2

This is a discussion on Migrating PostgreSQL to DB2 within the DB2 forums, part of the Database Server Software category; --> Folks, I'm trying to port a PostgreSQL application to DB2 LUW 8.2.2 (Win32, if you must know). I've searched ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 06:01 AM
Larry Menard
 
Posts: n/a
Default Migrating PostgreSQL to DB2

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"



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 06:01 AM
Gert van der Kooij
 
Posts: n/a
Default Re: Migrating PostgreSQL to DB2

In article <ApCdnUrxLKQyqtTeRVn-pg@rogers.com>, Larry Menard
(root@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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 06:02 AM
Marc Schoechlin
 
Posts: n/a
Default Re: Migrating PostgreSQL to DB2

Hi !

Gert van der Kooij <gert@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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 06:02 AM
Gert van der Kooij
 
Posts: n/a
Default Re: Migrating PostgreSQL to DB2

In article <slrndkla3u.de5.mslists@256bit.org>, Marc Schoechlin
(mslists@256bit.org) says...
> Hi !
>
> Gert van der Kooij <gert@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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 06:02 AM
Buck Nuggets
 
Posts: n/a
Default Re: Migrating PostgreSQL to DB2

Marc Schoechlin wrote:
> Gert van der Kooij <gert@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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 06:02 AM
Larry Menard
 
Posts: n/a
Default Re: Migrating PostgreSQL to DB2

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" <mslists@256bit.org> wrote in message
news:slrndkla3u.de5.mslists@256bit.org...
> Hi !
>
> Gert van der Kooij <gert@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/
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com