Comments (2)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 AngocA commented Permalink

In this Webminar, I asked about the compatibility between an application using Oracle SQLJ. I would like to know if this is also compatible when running DB2.
I know that in DB2 there is a precompilation process to generate the java file, and a profile, and then this is compiled (java) and binded in the database. However, this process in Oracle generates similar files, but the precompiler is not the same, and the generated "profile" is for an Oracle db.
So how does the compatibility works here? just in execution? compilation? All the sqlj queries are processed correctly at precompilation time?

2 SergeRielau commented Permalink

We encounter SQLJ rarely when converting Oracle Applications to DB2, so I double checked with our JDBC and SQLJ experts and here is what they think:

We cannot guarantee binary compatibility between DB2 and Oracle for SQLJ applications.
That was the goal of the SQLJ consortium (ORACLE IBM, Sybase and may others ) when it was formed more than decade ago.
So if a SQLJ program was just translated it could run against any Database using the default SQLJ runtime and the vendor's JDBC driver.
There were hooks provided for customization against a database and that was vendor specific. SQLj runtime could take
advantage of the customized path if available at runtime.
However, the consortium does not exist anymore and ORACLE and IBM have gone their separate ways in SQLJ.
So it is quite possible that ORACLE has added extensions into SQLJ which IBM does not have.
For most parts however we think there would be source level compatibility.
That means if I take a SQLJ program written for the ORACLE I can re-translate/customize/bind using IBM SQLJ /JCC against DB2 and it would run.
SQLJ specs are an ANSI standard.