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.
Related
I have memsql server version 6.7. I am able to connect to it using mysql java connector version 5.1.47 from my spring boot application.
But when i upgrade connector version to 8.0.16 I get below error -
Caused by: java.sql.SQLException: Unknown system variable 'performance_schema'
Ran query SHOW VARIABLES; on my memsql instance and I do not see system variable 'performance_schema'.
Can i change datasource.url string to ignore this variable? Any other latest version of driver is supported?
If your concern is the security issue in the 8.0.15 mysql driver you could use the mariaDb drivers instead. We generally recommend folks use them with MemSQL:
https://docs.memsql.com/client-downloads/
MySQL 8 made a number of breaking changes (i.e., you will have issues with MySQL 8 drivers connecting to older versions of MySQL as well : https://bugs.mysql.com/bug.php?id=90994)
From https://github.com/spring-projects/spring-boot/issues/17090:
A relevant change in Spring Boot 2.1.5 would appear to be that it upgraded MySQL's Java connector from 8.0.15 to 8.0.16. The 8.0.x driver should be compatible with MySQL 5.6, 5.7, and 8.0 so this would either appear to be a problem with your configuration or, probably more likely, a regression in the driver. If you would like to pursue this, I would recommend asking for some help on the MySQL forums and providing sufficient information to allow someone to reproduce the problem.
Try version 8.0.15 to see if that works better.
Just a simple question (I guess). Oracle released a new JDBC driver for Oracle Database 12c including a Java 7 JDBC driver (ojdbc7 - 12.1.0.1). Here, we've been using Oracle 10g database with ojdbc6 for Oracle 11g (11.2.0.4) without any problem. Now, my questions.
If I upgrade my application server to use ojdbc7 for Oracle 12c, is it too risk? Does the Oracle maintains compatibility of their drivers with previous versions?
Yes. This is officially supported per Oracle. http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_02
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 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.
I'd like to know if jdbc by itself is compatible with mysql or do I have to intsall something extra? I was told it is not compatible and that I'd have to use a different database.
It does.
You have to use the correct mysql jdbc driver and that's it!
Some useful links:
Little old but still helpful:
Using JDBC with MySQL, Getting Started
Official reference:
Official JDBC Driver
JDBC reference
You have to look at your specific version.
MySQL belogs to Sun Microsystems now after all
Using MySQL from Java
JDBC is a specification for Java/database interaction. As a specification it's compatible with almost every DB. However, you need a JDBC compliant driver written for your database. Googling "jdbc driver {databasevendor}" should get you an the right track.