Newbie question here… I need to select an JDBC driver to connect an application server Java program to an Oracle 11G database on another server. Both servers are Linux CentOS, and they are physically next to each other and connected via a cross connect ethernet cable. I’m not doing an Oracle RAC.
Oracle’s website lists the available options:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
For reference, there’s a similar post here:
Which JDBC driver type should I use for accessing an Oracle Database?
My goal is more specific: which one to select among the following (JDK 1.6) drivers?
ojdbc6.jar (Classes for use with JDK 1.6. It contains the JDBC driver classes
except classes for NLS support in Oracle Object and Collection types)
ojdbc6_g.jar (Same as ojdbc6.jar except compiled with "javac -g" and contains
tracing code)
ojdbc6dms.jar (Same as ojdbc6.jar, except that it contains instrumentation to
support DMS and limited java.util.logging calls)
ojdbc6dms_g.jar (Same as ojdbc6_g.jar except that it contains instrumentation to
support DMS)
Q1: Are these all what Oracle calls “JDBC Thin” drivers (or are some OCI “thick” drivers)?
Q2: Are these all Type 4 drivers?
Q3: Are these all free (assuming I’ve purchased the Oracle 11G database license)?
Q4: Assuming time-to-compile is not an issue, wouldn’t all of the _g.tar files be preferred, especially since the -g compile option (e.g. useful for debugging) can be turned off (e.g. to increase speed for production compiled code)? Or, when I go to production, should I switch drivers to the non _g file (e.g. replace ojdbc_g.jar with ojdbc.jar)?
Q5: I’m not even sure what NLS, or Oracle Object and Collection types, or DMS refer to. Any advice on when the drivers to support these concepts would be useful would be much appreciated.
A1. Yes. JDBC Thin. The OCI versions are related to the Instant client and are platform specific.
A2. Yes. Those are platform-independent, just plug-n-play hehe.
A3. Yes. You can use them despite having no DB license. In fact, you agree to OTN license to download them 🙂
A4. _g is useful at dev time. Otherwise, stay with the first one.
A5. NLS refers to Internationalization support. Means that classes for NLS support on objects and collections are not there, but those are used only on very specific requirements about some kind of data going between client and DB. DMS refers to Dynamic Monitoring Metrics and those are also very specific (discouraged on common use of the driver)