I'm planing to develop a web application with spring framework. I am using DB2 8.1 as database ,but did not find any JDBC driver for accessing DB2 from java.
For the most recent JDBC drivers, you can get them from http://www-01.ibm.com/support/docview.wss?uid=swg21363866
The drivers for 8.1 are not there, but the names are there. You can use any from the 9.1 version to connect to the 8.2 server.
Related
Can anyone point me on where to find an exact documenation which postgreSQL database version requires which JDBC driver version?
In the case at hand I want to know: What is the minimum required JDBC version in a Java server application connecting to a database of version PostgreSQL 11.13?
Unfortunately the PostgreSQL JDBC Driver website is not really precise on this:
The current version of the driver should be compatible with PostgreSQL
8.2 and higher, and Java 6 (JDBC 4.0), Java 7 (JDBC 4.1), Java 8 (JDBC 4.2) and Java 9.
https://jdbc.postgresql.org/about/about.html
The question is a wrong one. Why would you want to use a JDBC driver that has as many bugs as possible?
Rather, you want to ask what the oldest version is that the latest JDBC driver supports, and the documentation will tell you that
[...] nning old applications or JVMs), this is the driver you should be using. It supports PostgreSQL 8.2 or newer and requires Java 6 or newer.
Always use the latest JDBC driver, and you won't go wrong.
I have multiple db connection from my application. Recently we upgraded ojdbc version to 8 (ojdbc8) and some of the db connection began throwing exceptions, especally when executing stored procedures using spring jdbc templates. Those are databases with oracle version 9. If we switch back to older driver (ojdbc7) this works but other db integration fails. Is there any way I can use ojdbc7 driver for one database connection and ojdbc8 driver for others? We are using tomcat-8 and can we do this in server.xml?
I don't think you can load more than one version of a jdbc library in tomcat's CLASSPATH.
You could try though loading your jdbc connection pool on your application context META-INF/context.xml and adding the jdbc library in WEB-INF/lib folder for each application. If this works it would mean that your tomcat would load each jdbc library again and again for every application.
I would highly suggest splitting your applications into 2 tomcats (one with ojdbc7 and one with ojdbc8), so that you have a more clean setup.
I am trying to connect to my 10g database using oracle driver in ojdbc14.jar. My webservice is running on Websphere 7.0 which uses Jre 1.6.
When I am trying to access the Webservice, I am getting the following exception.
"JDBC driver name : Oracle JDBC driver
JDBC driver version : 10.2.0.4.0
JDBC driver specification level : 10.2
Oracle does not support the use of version 10 of their JDBC driver with the version of the Java runtime
environment that is used by the application server."
Please let me know which version of oracle thin driver I have to use to connect to my 10g Database using Websphere 7.0.
If Oracle 10g ships with a JDBC driver called ojdbc6.jar, then you should use it instead of ojdbc14.jar.
Otherwise, you can use the Oracle 11g JDBC driver (I know, for sure, that it ships with ojdbc16.jar). Unless otherwise noted, Oracle's JDBC drivers are backward compatible.
You said following (in the last line of your original question):
"Please let me know which version of oracle thin driver I have to use to connect to my 10g Database using Websphere 7.0.".
So, please note that you don't have to worry about the version of driver to connect to your database.
That's so because "Oracle 10g Database" is by default shipped with the RIGHT driver to connect to it.
Apart from this, which version of JDK are you using in WebSphere 7 ?
I am trying to connect to Teradata using jdbc. My application is running in JDK 1.4.
The url i am using is "jdbc:teradata:///TMODE=ANSI,CHARSET=UTF8";
I get "No suitable driver error" when i try to run using JDK 1.4.
However, I am able to run my app using JDK 1.7 with the same url.
I have both terajdbc4.jar and tdgssconfig.jar in my Netbeans libraries.
You probably use the wrong version of either Java, Teradata JDBC or Teradata Utilities (TTU).
Take a look here, what is compatible with what: Compatibility
The matrix is part of this reference which holds information how to use JDBC with different Application Server like JBoss, Tomcat, WebSphere, ColdFusion, WebLogic, SAP etc.
I trying to develop a program, which as a part of it functionality, needs to connect to a selected database(either Oracle, SQL Server, MySQL etc). I am using java for the program. Is it okay for me to use the latest jar file for each database? Will this latest driver support connectivity to all the previous versions of the database. For example if I use sqljdbc4.jar for SQL Server, will it support even older SQL Servers like SQL Server 2000. Or do i need to include all the driver jar files for support and modify code based on version?
The database driver used within your code should match the version of the database you are using. Why would you want to use a newer release of a driver when your not using the database it corresponds with?
With that being said many database drivers are backwards compatible to a certain point. For example, the Oracle 11g Drivers state:
The JDBC drivers are certified to work with the currently supported
versions of Oracle Database. For example, the JDBC Thin drivers in
Oracle Database 11g Release 1 (11.1) are certified to work with the
10.2.x, 10.1.x, 9.2.x, and 9.0.1.x Oracle Database releases. However, they are not certified to work with older, unsupported database
releases, such as 8.0.x and 7.x.
You should investigate your target driver to determine its compatibility with the database your using.
Yes, Most of jDBC drivers are backward compatible. When database are added new features, jDBC driver changes to support new features but will remain compatible for older version.