By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

Java against SQL Server

P: n/a
Anyone have any tips for using Java against SQL Server? Our IT
director is thinking of making us a Java shop, but I really would like
to stay with SQL Server as our RDBMS. We have Oracle Financials but
our in-house development (currently VB6 client-server, soon to be
replaced by a service-oriented architecture based around Sonic and
including SalesForce, both of which are Java) has been against SQL
Server. He says five years ago at his old company Java/SQL Server had
lousy performance. I vaguely remember that since then Microsoft came
out with their own JDBC driver for SQL Server... Anyone have experience
with this? Any performance tips will be hugely appreciated.

TIA

Jul 23 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Ellen K (ek*******@yahoo.com) writes:
Anyone have any tips for using Java against SQL Server? Our IT
director is thinking of making us a Java shop, but I really would like
to stay with SQL Server as our RDBMS. We have Oracle Financials but
our in-house development (currently VB6 client-server, soon to be
replaced by a service-oriented architecture based around Sonic and
including SalesForce, both of which are Java) has been against SQL
Server. He says five years ago at his old company Java/SQL Server had
lousy performance. I vaguely remember that since then Microsoft came
out with their own JDBC driver for SQL Server... Anyone have experience
with this? Any performance tips will be hugely appreciated.


The best thing with the MS driver is the price tag. I believe the driver
is an adapted version of the JDBC driver from Datadirect Technologies,
and Datadirect has since then released a later version.

I don't know much about Java, but I have a list of various offerings on
the market on http://www.sommarskog.se/mssqlperl/unix.html.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

P: n/a
Thanks very much, Erland. I went to both your page and DataDirect,
will test the DataDirect one as well as the Microsoft one.

Jul 23 '05 #3

P: n/a
Erland Sommarskog wrote:
The best thing with the MS driver is the price tag. I believe the driver is an adapted version of the JDBC driver from Datadirect Technologies, and Datadirect has since then released a later version.


You could also try out jTDS ( http://jtds.sourceforge.net ); it's an
open source (LGPL) JDBC 3.0 implementation and in my testing it's
faster than the other SQL Server drivers. It's also much more stable
and better supported than the MS driver; you can find a list of issues
with the MS driver, which is indeed a very old DataDirect driver, on
the DataDirect site -- they have a comparison between their current
driver and the MS one, which is in the same state as it was 5 years ago
when it was released.

Alin,
The jTDS Project.

Jul 23 '05 #4

P: n/a
Ellen. I have done Java-SQLServer work since '96. Because you are
just starting out, your testing may miss some issues that would only
show up later. Between the free MS driver and the DataDirect driver,
I heartily recommend that you choose the DataDirect driver. It will be
faster, less problematic, provide more functionality, and be better
supported than the MS one.
If you ever have problems with JDBC post here. This forum is rife
with helpful experts.

Joe Weinstein at BEA

Jul 23 '05 #5

P: n/a
Hi Alin,

I spent some time on the DataDirect site and did not find any list of
issues or point-by-point comparison with the MS driver. I would be
very interested to see this, so if you can provide a URL I will
certainly look again. The only negative thing they claim about it is
that it does not support JDBC 3.0. Some negative statements appear in
the case study they provide in support of their product, but the
statements pertain to the situation that prevailed before they
implemented DataDirect, i.e. not the current MS offering.

The Microsoft site indicates that the MS driver was first introduced in
2002, that it is a Type 4 driver that supports JDK 1.4, and that three
service packs have been released since then, the most recent in July
2004.

Thanks,

Ellen

Jul 23 '05 #6

P: n/a
Hi Joe,

Thanks very much for your input, and for the offer of help with JDBC --
I will definitely take you up on that!

Ellen

Jul 23 '05 #7

P: n/a
Ellen K wrote:
I spent some time on the DataDirect site and did not find any list of
issues or point-by-point comparison with the MS driver. I would be
very interested to see this, so if you can provide a URL I will
certainly look again. The only negative thing they claim about it is
that it does not support JDBC 3.0. Some negative statements appear in the case study they provide in support of their product, but the
statements pertain to the situation that prevailed before they
implemented DataDirect, i.e. not the current MS offering.
Use Google. Searching for "datadirect microsoft comparison" returned
http://www.datadirect.com/products/j...soft/index.ssp
(which, indeed isn't very detailed, but the JDBC 2.0 - JDBC 3.0
difference is considerable -- it took us at jTDS months to be able to
claim JDBC 3.0 compatibility). Searching for "jnetdirect microsoft
comparison" gives this more in-depth comparison:
http://www.jnetdirect.com/products.p...&context=mssql

Also, the MS driver is quite unstable. It has a lot of problem with
establishing connections (no one seems to know why), Blobs/Clobs,
date/time values, unchecked exceptions (NPEs and
IndexOutOfBoundsExceptions) and has a very serious limitation that the
DataDirect people already worked around in their last version (and that
other drivers didn't have to begin with): it either uses cursors and
needs to fetch one row at a time (incredibly bad performance) or is
unable to use transactions.
The Microsoft site indicates that the MS driver was first introduced in 2002, that it is a Type 4 driver that supports JDK 1.4, and that three service packs have been released since then, the most recent in July
2004.


You are somewhat right. The MS driver seems to have been initially
released in 2001, not 2000 (
http://www.windowsitpro.com/Article/...683/22683.html ) but I
highly doubt that at the time it had the latest DataDirect code (or
DataDirect would have run the risk of having to fight against an
identical free driver, when they sport huge prices by any standards).

Also, please take a look at the release notes/change logs of the MS
driver's service packs. They consist of 10-20 minor bug fixes, no major
changes, no new features. Compare that with the release notes for jTDS
(the change logs are a bit verbose). Their standard answer to any real
bug in their driver is "it might be fixed in the next service pack, but
we can't really say that for sure".

Alin,
The jTDS Project.

Jul 23 '05 #8

P: n/a
I guarantee you the lousy perfomance was from sloppy development. Both Java
and SQL Server are fabulous tools, and if set up properly by pros, they
should work great.

BTW, your boss sounds like a typical "let's just upgrade to the latest and
greatest reagrdless of how much code is already written in a current
platform"
"Ellen K" <ek*******@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Anyone have any tips for using Java against SQL Server? Our IT
director is thinking of making us a Java shop, but I really would like
to stay with SQL Server as our RDBMS. We have Oracle Financials but
our in-house development (currently VB6 client-server, soon to be
replaced by a service-oriented architecture based around Sonic and
including SalesForce, both of which are Java) has been against SQL
Server. He says five years ago at his old company Java/SQL Server had
lousy performance. I vaguely remember that since then Microsoft came
out with their own JDBC driver for SQL Server... Anyone have experience
with this? Any performance tips will be hugely appreciated.

TIA

Jul 23 '05 #9

P: n/a
For the application coding we are being asked to give our opinion re
whether we should use Java or .Net. My concern relates to the
assumption that if the application coding will be Java we have to go to
Oracle. I have programmed against Oracle, DB2 and SQL Server and SQL
Server is by far my choice for databases under 2 terabytes. Between
Oracle and DB2 I found DB2 much better -- performance smoked and
reliability was cast-iron, neither of which statement I could make
about Oracle. However it did not have as many nice proprietary
language extensions as either SQL Server or Oracle.

Jul 23 '05 #10

P: n/a
Thanks very much for those URLs, I will definitely follow up.

Jul 23 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.