• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Moving from Oracle to DB2

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic