{"id":90,"date":"2004-02-23T17:44:01","date_gmt":"2004-02-23T23:44:01","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=90"},"modified":"2004-02-23T17:44:01","modified_gmt":"2004-02-23T23:44:01","slug":"sql-server-jdbc-driver-troubles","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/90","title":{"rendered":"SQL Server JDBC driver troubles"},"content":{"rendered":"<p>I&#8217;m responsible for a small <a href='http:\/\/jakarta.apache.org\/struts\/'>struts<\/a> application for one of my clients. The application was originally coded on Windows against a SQL Server 2000 database. When I was contracted to roll it to production, a Linux box talking to a SQL Server 7 database, I found I couldn&#8217;t use the existing <a href='http:\/\/www.microsoft.com\/downloads\/details.aspx?FamilyID=9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71&amp;DisplayLang=en'>MS JDBC drivers<\/a>, which only support <a href='http:\/\/www.microsoft.com\/sql\/'>SQL Server 2000<\/a>.  So, I went looking for SQL Server 7 JDBC drivers.  There are a ton of choices out there, but most are commercial.  I looked at <a href='http:\/\/jtds.sourceforge.net\/'>jTDS<\/a>, but that didn&#8217;t work because, at the time, jTDS did not support <code>CallableStatement<\/code>s, which were used extensively by this application.  (Apparently, jTDS <a href='http:\/\/jtds.sourceforge.net\/faq.html#callEscapeSequence'>does now<\/a>.)<\/p>\n<p>So, I looked at a few commercial drivers, and decided that <a href='http:\/\/www.inetsoftware.de\/English\/scripts\/FrameSet.asp?path=http:\/\/www.inetsoftware.de\/English\/Produkte\/OPTA\/&amp;name=default_main.htm'>Opta2000<\/a> offered the best feature set for the price ($800 for unlimited web application connections).  Then, the database was upgraded from SQL Server 7 to SQL Server 2000.  Luckily, we hadn&#8217;t bought the JDBC driver yet, so, hey, let&#8217;s use MS JDBC drivers&#8211;they&#8217;re free!  Fantastic. The installation went fine (not that it was that complicated&#8211;dropping some new jars in the <code>WEB-INF\/lib<\/code> directory and changing some lines in the <code>struts-config.xml<\/code>Tomcat<\/a> (version 4.1.24) started behaving badly.  With IE (and, to a lesser extent, with Mozilla), the pages started loading very slowly after Tomcat had been running for a while.  A restart alleviated this symptom, but didn&#8217;t obviously solve the problem.  Initially, we thought it was the load, and some misconfiguration of tomcat (tomcat was serving images&#8211;not usually considered its strong point, though <a href='http:\/\/marc.theaimsgroup.com\/?l=tomcat-user&amp;m=106036208909661&amp;w=2'>benchmarks<\/a> are needed to tell the full tale), but nothing seemed to change the behavior.  We tried changing how tomcat was passed requests (<a href='http:\/\/jakarta.apache.org\/tomcat\/tomcat-4.0-doc\/config\/ajp.html'>mod_jk<\/a>, <a href='http:\/\/httpd.apache.org\/docs-2.0\/mod\/mod_proxy.html'>mod_proxy<\/a>), but nothing seemed to work.  A colleague of mine looked at when the instability started, and it correlated with the installation of the MS JDBC drivers.  So, we switched back to Opta.  The application returned to a stable state, and we haven&#8217;t seen the problems since.   (We plan to purchase the drivers now, although we may take a look at jTDS.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m responsible for a small struts application for one of my clients. The application was originally coded on Windows against a SQL Server 2000 database. When I was contracted to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":0,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}