473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Switch from Oracle to DB2

At a high level - what would be involved in switching from Oracle to DB2?

Pretty vague, I know - but anyone have experience with this kind of migration?

Pointers? Things to look for?

Tmuld
Nov 12 '05 #1
8 3759
Hi,

Tavish Muldoon wrote:
At a high level - what would be involved in switching from Oracle to DB2?

Pretty vague, I know - but anyone have experience with this kind of migration?

Pointers? Things to look for?
There is a (free) migration tool from IBM for the migration from Oracle
to DB2. They showed it on a migration workshop and it seem to perform
very well (at least for simple databases). You find it on the IBM webpage.

Tmuld


HTH, Jan
Nov 12 '05 #2
RdR
Generally straightforward but some small little issues that may need some
work like Oracle sees zero length varchars as NULLs but DB2 sees it as not
NULL. From Oracle to DB2, this is not a problem but during the migration
period wherein both systems should be Master databases, synchronizing data
that are zero length varchars in DB2, Oracle will not put them on a
non-NULLable field because Oracle thinks it is a NULL.

Generally you need to plan on the following:

1) Need a tool to synchronize data Oracle to DB2. Producing a flat file in
Oracle then FTP to the DB2 box and using DB2 tools to load the data in DB2
should do the job.
2) If this is not a one time migration and you need some time wherein both
databases are being updated on both sides, you also need a tool to
synchronize data both ways. You need more of a replication tool. DPROP may
handle this but that was not the tool we used. Note the zero length varchar
DB2 mapping to an Oracle Not NULL counterpart I mentioned above.
3) Need to pay specific attention to different database structures on both
sides, a mapping tool should help ease up this process. If the table
structures are the same on both sides, then this should not be a bog
concern.
4) Go to this website, http://troels.arvin.dk/db/rdbms/ this should guide
you on the differences in SQL implementation on Oracle and DB2 (among
others).
5) Needless to say, backup so if something goes wrong, you can always go
back to the state you were in prior to doing the migration.

Thanks,

Johnnywhizkid

"Tavish Muldoon" <tm******@spliced.com> wrote in message
news:e2**************************@posting.google.c om...
At a high level - what would be involved in switching from Oracle to DB2?

Pretty vague, I know - but anyone have experience with this kind of migration?
Pointers? Things to look for?

Tmuld

Nov 12 '05 #3
Here is URL for migration toolkit ...

http://www-306.ibm.com/software/data/db2/migration/

Jan Suchanek <ja**********@gmx.de> wrote in message news:<41********@news.uni-ulm.de>...
Hi,

Tavish Muldoon wrote:
At a high level - what would be involved in switching from Oracle to DB2?

Pretty vague, I know - but anyone have experience with this kind of migration?

Pointers? Things to look for?


There is a (free) migration tool from IBM for the migration from Oracle
to DB2. They showed it on a migration workshop and it seem to perform
very well (at least for simple databases). You find it on the IBM webpage.

Tmuld


HTH, Jan

Nov 12 '05 #4
Tavish Muldoon wrote:
At a high level - what would be involved in switching from Oracle to DB2?

Pretty vague, I know - but anyone have experience with this kind of migration? Oh yeah.. Lotsa... Pointers? Things to look for?

Make sure you have some sort of QA on the Oracle side that you can port.
Otherwise you'll have a hell of a time proving that the DB2 side is
doing what the Oracle side is doing (and live data is a BAD(tm) choice
because it's not reproducible).

The migration toolkit (MTK) will try it's best to provide a correct(!)
translation, including emulating all those quirks (like the '' = NULL).

Debug for correctness first.

You may be off by an order of magnitude in speed at first.
That is OK for an Oracle emulation run by DB2.
Then you start tuning those areas that you care about (not everything is
time-critical).
Look at the PL/SQL code then look at the SQL PL (code):
Most of the fluff added by MTK can likely be removed (like Java UDF
handling slight semantic differences).
Often the default exception handlers are a drag.
Once you removed the fluff. If performance isn't on par yet you look at
the algorithm. It may be tuned specifically to work around some Oracle X
shortcoming that DB2 deosn't have or works around differently.
that's where the fun starts and you will really need to learn DB2.

Here are a couple of articles directly coming from migration experience:
http://www-106.ibm.com/developerwork...dm-0409rielau/
http://www-106.ibm.com/developerwork...dm-0406rielau/

The second article was born in a Orcale to DB2 + DPF warehouse migration.
We started of with 30x slower (emulation). And ended up ~2x faster
(apples-oranges hardware though). The point is, unless the app is
trivial it doesn't coem for free but if you stick with it the end result
will be worth it.

Try to get into the migration workshop. It'll give you a head start.

feel free to bug this newsgroup :-)

Cheers
Serge
Nov 12 '05 #5
AK
that's what I posted a year ago:

1. Schema conversion.
I downloaded Migration Toolkit from
http://www-3.ibm.com/software/data/d...src_d=99999999
Migration from SQL Server seems to be in better shape, migration from
Oracle is in beta yet.
I wasn't able to have Migration toolkit move data properly.

2. Connectivity
DB2 uses only operating system autentication (similar to Windows
authenication for MS SQL Server ), it does not have its own
authenication.
.... but we need to convert schema name to uppercase when selecting
from catalog views, like htis: WHERE TABSCHEMA=UPPER('schemaname')

3. Different system (catalog) views (DB@ catalog views are documented
in Appendix D of SQL Reference)

Functions:
SUBSTR - interface same as in Oracle. Documened in SQL Reference
Oracle: TO_NUMBER
MS SQL Server: CONVERT(INT,
DB2: INT(

4. Replaced DELETE <TableName> with DELETE FROM <TableName>. DELETE
FROM works against Oracle and SQL Server too.

5. Fetching first N rows.
In Oracle: RowNum<10
In SQL Server: TOP 10
In DB2: SELECT * fFROM SOME_TABLE WHERE some condition FETCH FIRST 10
ROWS ONLY

6. Replaced INSERT <TableName> with INSERT INTO <TableName>. INSERT
INTO works against Oracle and SQL Server too.

7. Replaced INSERT INTO TableName SELECT Column1, Column2, NULL, NULL
FROM ...
with
INSERT INTO TableName(Column1, Column2) SELECT Column1, Column2 FROM
This works against Oracle and SQL Server too

8. Constraint name length cannot exceed 18 characters, so I changed
all the DROP/ADD CONSTRAINT statements, so that constraint names are
system generated, and retrieved from catalog view (because you need to
know constraint's name to drop it):
Same about index names

9. There are many differences in error messages, such as when index to
be dropped does not exist. They are all (or almost all)
vendor specific.

10. TRUNCATE TABLE won't work against DB2. Used DELETE FROM instead. I
think DROP/CREATE TABLE might work much much faster

11. Since schema name is in lower case, I needed to explicitly convert
it to uppercase when retrieveing from system (catalog) views:
SELECT TYPE FROM SYSCAT.TABCONST WHERE TABSCHEMA = SYSIBM.UPPER('...')
AND TYPE = 'P' AND TABNAME = '...'

12. When an INSERT/UPDATE/DELETE/SELECT statement actually
modifies/fetches no rows, DB2 issues an error ... . Error message
looks like "No row was found for".
wanted to add that an application that was simply ported usually does
not perform well, because there are many significant differences, such
as:
- locking strategy in Oracle is entirely different
- indexing is somewhat different (for instnace, NULLS are not stored
in Oracle indexes)

So, to achieve better performance, we usually have to reconsider some
design decisions.
Nov 12 '05 #6
AK wrote:
that's what I posted a year ago:

2. Connectivity
DB2 uses only operating system autentication (similar to Windows
authenication for MS SQL Server ), it does not have its own
authenication.
In DB2 V8.2 you can use security exits and do your own user authentication.
Nothing prevents you from managing your users via a database. Have a look
here:

http://publib.boulder.ibm.com/infoce...d/c0011970.htm

So this issue is already dealt with.
... but we need to convert schema name to uppercase when selecting
from catalog views, like htis: WHERE TABSCHEMA=UPPER('schemaname')
If you use delimited schema and table names, then you don't have to do this
conversion. I believe the upper-case might be something that comes from
the SQL standard.
4. Replaced DELETE <TableName> with DELETE FROM <TableName>. DELETE
FROM works against Oracle and SQL Server too.

6. Replaced INSERT <TableName> with INSERT INTO <TableName>. INSERT
INTO works against Oracle and SQL Server too.
DELETE FROM and INSERT INTO are SQL standard.
10. TRUNCATE TABLE won't work against DB2. Used DELETE FROM instead. I
think DROP/CREATE TABLE might work much much faster
You can use LOAD ... REPLACE ... that offers the very same functionality.
Wrapped in a stored procedure, it is even more convenient as is described
here:
http://www.ibm.com/developerworks/db...ein/index.html

Please note that DELETE FROM causes much more log records to be written than
a LOAD REPLACE. And too many log records can cause a log-full error
condition.
11. Since schema name is in lower case, I needed to explicitly convert
it to uppercase when retrieveing from system (catalog) views:
SELECT TYPE FROM SYSCAT.TABCONST WHERE TABSCHEMA = SYSIBM.UPPER('...')
AND TYPE = 'P' AND TABNAME = '...'
Let's say it that way: DB2 converts the schema name to upper case by
default, unless you place double-quotes around it.
12. When an INSERT/UPDATE/DELETE/SELECT statement actually
modifies/fetches no rows, DB2 issues an error ... . Error message
looks like "No row was found for".


No, DB2 raises a warning condition with SQLCODE +100. That's not an error
and is mandated by the SQL standard. Oracle does the same.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #7
Bob
Is that migration tool really free? Here is what I read in the url below:
'Migrate Now! for DB2 Universal Database (UDB) V8.1 facilitates the
migration from Oracle, Sybase, Microsoft SQL server, and additional database
platforms to DB2 UDB V8.1 at a special price.'

By the way, there is also another replication solution from StarQuest
(StarQuest Data Replicator -
http://www.starquest.com/Productfolder/infoSQDR.html). DPROP was also
mentioned in another post (but obviously this is not free!).

Bob
"Paul Samundar" <sa******@email.com> a écrit dans le message de
news:fb**************************@posting.google.c om...
Here is URL for migration toolkit ...

http://www-306.ibm.com/software/data/db2/migration/

Jan Suchanek <ja**********@gmx.de> wrote in message

news:<41********@news.uni-ulm.de>...
Hi,

Tavish Muldoon wrote:
At a high level - what would be involved in switching from Oracle to DB2?
Pretty vague, I know - but anyone have experience with this kind of migration?
Pointers? Things to look for?


There is a (free) migration tool from IBM for the migration from Oracle
to DB2. They showed it on a migration workshop and it seem to perform
very well (at least for simple databases). You find it on the IBM webpage.

Tmuld


HTH, Jan

Nov 12 '05 #8
Bob,

Yes the MTK is free. The offer relates to a special offer for the DB2
license (perhaps amongst other things such as training) if you replace
an existing competitive license.

Cheers
Serge

Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
0
by: Suzyque54 | last post by:
I have two Oracle Homes (9iR2 & 10g R2) installed on Windows Server 2003. I have jobs running on my 9i database for backup and they are now failing because the default home is now10g as that was...
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
2
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004...
0
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: sathyguy | last post by:
when i type the below in my RHEL AS 4's Firefox 1.5 http://appsworld.ncc.com:7777/forms/...&form=test.fmx iam getting the below error... The requested URL /forms/frmservlet was not found on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.