Robert Hurlbut Blog

Thoughts on Software Security, Software Architecture, Software Development, and Agility

SQL Server 2005 JDBC driver experiences

Sunday, January 29, 2006 Comments

 .NET  Database Development  Security 
Share:   Share on LinkedIn    Share on Twitter    Share on Google+    Share on Facebook   

I have been doing a fair amount of development in VC++, Java, and .NET 2.0 lately for one large project that is finally winding down after almost a year's worth of work. This past week, I put the new SQL Server 2005 JDBC driver (RTM on January 20th) through its paces against a SQL Server 2000 database (the driver is works with both 2000 and 2005). I had been using the previous SQL Server 2000 JDBC SP3 driver. The main difference is the old driver was licensed and the new driver was written from scratch to support the new features of SQL Server 2005.

On this particular project, I am still using SQL Server 2000 (though, I also do quite a bit of SQL Server 2005 testing and development as well). After installing and using the driver (there are a couple of changes needed such as the position of "sqlserver" in the namespace calling methods), I immediately saw a dramatic positive difference in performance. I also found the new driver to be less forgiving of badly written code (which I like!). I had written some new stored procedures and related Java code that were running along side previously written in-line SQL that didn't take into consideration correct transactional handling (this project has been mostly about updating legacy code rather than writing code from scratch). I found the combination of techniques was quickly causing a major block in SQL Server. I thought perhaps it was the introduction of the new driver, but the old driver produced the same results, just not as quickly or as noticiable. I updated all SQL calls to use consistent transactional methods (as well as, in this case, stored procedures -- not really a factor, but I prefer that), and my blocking problem was solved.

All in all, I am very pleased with the new driver and recommend it to others if you are doing any Java + SQL Server 2000/2005 development. One caveat is new driver had to drop integrated authentication for the final release (it was present in most of the Betas). There were too many issues to consider before rushing it into production -- but I know several developers who were waiting for the release were really expecting this feature in particular. The Microsoft JDBC team are currently promising to release it at the same time as the SQL Server 2005 SP1 later this Spring.

Share:   Share on LinkedIn    Share on Twitter    Share on Google+    Share on Facebook