473,883 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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"

Nov 12 '05 #1
5 2560
In article <Ap************ ********@rogers .com>, Larry Menard
(ro**@GoSpamYou rself.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
Hi !

Gert van der Kooij <ge**@invalid.n l> 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
In article <sl************ ********@256bit .org>, Marc Schoechlin
(ms*****@256bit .org) says...
Hi !

Gert van der Kooij <ge**@invalid.n l> 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
Marc Schoechlin wrote:
Gert van der Kooij <ge**@invalid.n l> 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
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*****@25 6bit.org...
Hi !

Gert van der Kooij <ge**@invalid.n l> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8524
by: Bernardo Robelo | last post by:
Hi, I am interested in migrating Microsoft Access database to Postgres database. But I do not have idea of like initiating. Maybe some tool exists for this problem. Thanks you. Bernardo
1
1467
by: JM | last post by:
Hi, Just recently one of my box went down due to filestsystem corruption.. Luckily I was able to recover my /var/lib/pgsql directory... now my problem lies on how to recover this data... all my boxes runs on rh9 and compiling the source and rebuilding the source rpm is not helping out either.. is there a way on how to migrate my old data?
2
3249
by: Jean-Claude Adams | last post by:
Hi Folks. I need some tutorial or some expertice about the subject. Because, i'm have a customer, need's change the actual appl, but the only issue is a dbf database, and the GUI is the older blue screen. You know, it's very old and huge data to migrating. Well, the challenge for me now, it's create the structure and change thhe interface, well, is the same menu, but other screen for the user. i'm always like for backend the...
3
1146
by: Michael Hoeller | last post by:
Hello, I searched the archives and since I'm a relatively noivce user I'll have to run the risk of repeating already asked questions. I'm having a problem to migrate from version 7.3.4 to 7.4.2 On version 7.3.4 I do: vacuumdb --analyze $PGDATABASE pg_dump -x $PGDATABASE >$DATABASE
4
1748
by: Kaloyan Iliev Iliev | last post by:
Dear friends, I have the following problem. libvar=# select version(); version ---------------------------------------------------------------- PostgreSQL 7.2.3 on i386-pc-bsdi4.0.1, compiled by GCC 2.7.2.1 (1 row)
2
1724
by: John | last post by:
As per subject, i'm considering migrating a database (still in development) from MaxDB to postgresql. The main reason for this is that the stored procedures (functions) in MaxDB are unreliable and hard to debug, and that the JDBC driver is still experimental. I thought I'd post here to find out how well functions and JDBC are supported in postgresql. If anyone has info or experience on these two things, I'd be interested to see what...
4
2635
by: Collin Peters | last post by:
I have searched the Internet... but haven't found much relating to this. I am wondering on what the best practices are for migrating a developmemnt database to a release database. Here is the simplest example of my situation (real world would be more complex). Say you have two versions of your application. A release version and a development version. After a month of developing you are ready to release a new version. There have...
2
1532
by: stpro13 | last post by:
Hi all, I have a database (postgresql) designed with a particular schema. I have now set up a new postgresql database to store the same data (possibly some new info added) but has a different schema. (Basically, we have designed a new application and tweaked the database schema). The new db is set up using Java5 Java Persitence Architecture (annotations etc). The problem is we need to migrate the data from the old db to the new db. Is there an...
1
3101
by: Teboo | last post by:
Hi, I'm migrating a database into postgres what steps do I need to take? I have installed postgres database. Some Oracle data type is not the same as in postgres, What migration tools can I use to make it easier? Thanking you.
0
9942
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10851
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7133
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5801
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3235
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.