Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

differences between ms sql microsoft's jdbc drivers and jTDS's driver

What are the differences between each driver? I mean, besides one of them being open-source

What are the pros / cons of each one?

Which one would you recommend?


here's jTDS own opinion on the subject: http://jtds.sourceforge.net/

like image 552
opensas Avatar asked Dec 09 '10 00:12

opensas


People also ask

What is the difference between jTDS and JDBC?

One relevant difference is, that the JDBC 4.0 Implementation of the JTDS-Driver (v1. 3.1) requires at least Java 7, whereas the JDBC 4.0 Implementation of the Microsoft driver is available in Java 6. This is important if you want to use Hibernate 4.3 (relying on JDBC 4.0 API) and support Java 6.

What is Microsoft JDBC driver?

The Microsoft JDBC Driver for SQL Server is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available on the Java platform. The driver downloads are available to all users at no extra charge.

What is SQL Server jTDS?

jTDS is an open source 100% pure Java (type 4) JDBC 3.0 driver for Microsoft SQL Server (6.5, 7, 2000, 2005, 2008 and 2012) and Sybase Adaptive Server Enterprise (10, 11, 12 and 15). jTDS is based on FreeTDS and is currently the fastest production-ready JDBC driver for SQL Server and Sybase ASE.


2 Answers

They are distinct implementations. The jTDS driver is a type 4 and in my experience has better performance. I have been using the jTDS driver in a production environment without any issues for 5 years.

I would recommend going with jTDS.

like image 173
jzd Avatar answered Sep 20 '22 17:09

jzd


While for many years jTDS was much superior than buggy mssql's own driver, the things are changing to the opposite recently.

Here is qoute from https://confluence.atlassian.com/bitbucketserver/transitioning-from-jtds-to-microsoft-s-jdbc-driver-776640388.html:

Why change drivers?

Recent releases of Hibernate, which Bitbucket Server uses to simplify its persistence layer, have introduced a requirement that the JDBC drivers and connection pools used be JDBC4-compliant. JDBC4 was introduced with Java 6.

The jTDS driver used by releases prior to Bitbucket Server 2.1 is a JDBC3 driver, compatible with Java 1.3, and therefore cannot be used with newer versions of Hibernate. While jTDS 1.3.0 and 1.3.1 claim to implement JDBC4, and JDBC4.1, they actually don't. The new methods have been "implemented", but their implementations are all throw new AbstractMethodError(), which means they can't actually be used. (See an example here, on GitHub.)

Since jTDS 1.3.1 does not provide a functioning JDBC4 implementation, the decision was made to replace jTDS with Microsoft's own SQL Server driver. Microsoft's driver is actively maintained, where jTDS hasn't been updated since 2014 (and prior to the small round of updates done in 2014 it hadn't been updated for multiple years). Microsoft offers a full JDBC4.2 (Java 8) driver and supports all the features of SQL Server, including SQL Server 2016.

like image 28
Vadzim Avatar answered Sep 20 '22 17:09

Vadzim