• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moving from Oracle to DB2

 
Dinesh Ramakrishnan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

We currently have our web application certified on SQL server 2005 and Oracle 9i/10g. The data layer of the application is built on hibernate layer and also plain JDBC calls with direct SQL's.

Do we know of any issues if we go against DB2 database? I understand Hibernate supports DB2 as well but wanted to check for any known issues.

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate supports DB2 so that aspect should be OK without any changes (though you don't say which version of DB2 - DB2 390 is a very different beast). The only issue is your direct SQL. Typically, direct SQL is used in circumstances where the logic is too specialized to use Criteria or HQL so its probably going to be an issue. But assuming you've made judicious use of a DAO pattern it shouldn't be a massive job to work round.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My last job used DB2 390 :(

Other than what Paul mentioned, the only other non-manually-coded-SQL issue might be with primary keys, but whether or not that's an issue depends on how you've defined them.
 
Dinesh Ramakrishnan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I know whats the issue with direct SQL's. We use direct SQL's mostly for read-only queries and I thought could modify the queries if for any Oracle specific keywords

Also David you mentioned about Primary key concern. I found both Primary Key and Unique key definition in DB2. Can you detail on this issue?

Thanks very much
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dinesh Ramakrishnan wrote:Can I know whats the issue with direct SQL's. We use direct SQL's mostly for read-only queries and I thought could modify the queries if for any Oracle specific keywords

This is the problem - that Oracle specific syntax creeps into hand coded queries. Like Oracle's rownum, vs db2's fetch first. Depending how many queries you have, this could be a lot of work to change.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic