I am using oracle 11g . I do not know what is the default driver comes with oracle 11g. I see ojdbc14-10.2.0.3.0 under my <TOMCAT_HOME>/lib. I am not sure what change i need to do to make sure i am using JDBC 4 driver ?
Do i need to replace ojdbc14-10.2.0.3.0 or i need to put some other jar under my oracle installation ?
According to Oracle article, Oracle Database 11g Release 1 (11.1) goes with JDBC drivers provide support for the JDBC 4.0 standard.
You should have the ojdbc6.jar in your classpath environment variable in order to have JDBC 4.0 standard support.
Take a look at Oracle's JDBC drivers list: for 11g and 11g2, only ojdbc5.jar and ojdbc6.jar are listed, but some says that ojbc14 should work just fine with Oracle11g.
The primary difference between ojbc14 and later versions is that it wouldn't support new JDBC API, so I suppose you should better go with newer drivers.
Related
Prior to Java 8 when there was support for type 1 JDBC drivers, were two different drivers used?
The JDBC-ODBC bridge driver included with Java.
ODBC driver for Database System being used, which users need to download and install separately and then configure.
You are correct. The Java app sent queries to the JDBC-ODBC Bridge, which passed them along to the database's ODBC driver, which in turn passed them on to the database itself. The responses followed the same path in the opposite direction.
I am using JAVA DB (Part of JDK1.7) for my development environment. We have Oracle 11g on our SIT environment. I was researching whether JAVA DB (Which is based upon Apache Derby) is compliant with Oracle 11g i.e. Will I need some changes in my query structure or code if I try to migrate my code from JAVA DB to Oracle 11g?
Java DB and Oracle 11g are not entirely compatible with each other. Depending on your query's complexity, you may or may not need to port your code.
it just require the connection to particular db which are using do need any extra code for db it is same for any database
SQL Compatibility is a big topic. You might want to start here: http://wiki.apache.org/db-derby/SQLvsDerbyFeatures
I have a java application which connects to Oracle database, but I want the application to use OS authentication instead of providing the credentials of the database user through the program. I was able to implement it in a JAVA application which was built using JDK 1.6 by using jdbc driver package ojdbc5.jar instead of classes12.jar (which I was using earlier). I did that because I read somewhere that classes12.jar doesn't support OS authentication.
Everything worked fine for this application, but when I tried to implement the same in a JAVA application built on JDK 1.4, I was getting errors while compiling the code by using ojdbc5.jar
How can I implement OS authentication on apps built on JDK 1.4?
You can't (And even if you could, it wouldn't be a good idea, since any user could impersonate another user using -Djava.user=someoneelse on the command line).
From the Oracle Docs:
In 11g release 2 (11.2), both the JDBC OCI and thin drivers support
all the Oracle Advanced Security features. Earlier releases of the
JDBC drivers did not support some of the ASO features.
ojdbc5.jar is for java 1.5, ojdbc6.jar is for java 1.6, and the older classes12.jar, which will work with java 1.4, stopped being supported with Oracle 10.
You might try the newest Oracle 10 driver, (try ojdbc14.jar), but even if it works, it's not really a good idea because it's just not secure.
We're currently using ojdbc14.jar, should we be using ojdbc6.jar ?
Update: Oracle 10g being used
If you're working with java6, you can (and should) use ojdbc6.jar if it is compatible with your database.
Resources :
oracle.com - JDBC drivers
Short answer - yes, you should.
Long answer - look at compatibility tables in Oracle JDBC FAQ:
Which JDBC drivers support which versions of Oracle Database?
Which JDBC drivers support which versions of Javasoft's JDK?
For JDK 1.6 and Oracle 10g best option is o
What is the difference between the drivers provided using jtds.jar and jconn3.jar?
JTDS is open source (LGPL), the other is proprietary, made by sybase. In terms of which performs better, you would have to benchmark.
Sybase calls their latest JDBC jconn4.jar, so the version you are referencing complies with the JDBC 2.0 spec only. JTDS complies with JDBC 3.0. Whether or not that is important depends on the version of Java you are using to run your application.
jTDS works with both Microsoft SQL Server and Sybase. SQL Server is the product of a "collaboration" between Microsoft and Sybase, so that's not surprising.