title: MS Jdbc driver sqljdbc 2.0 driver fails to connect to SQL Server 2008
body: <p>We have a well-defined problem that points to a problem with Microsoft's JDBC 2.0 driver for JDK 1.6 ("sqljdbc4.jar"). </p>
  
  <p>I may be wrong. I've been wrong before.  I wanted to see if I'm missing anything. any insights? Anyone seen this before? </p>
  
  <p>Usecase:</p>
  
  <ul>
  <li>use ant "sql" task to run a simple sql query. All queries fail </li>
  <li>jdbc driver throws an exception when connecting: "The server version is not supported. The target server must be SQL Server 2000 or later." (stack trace excerpt below)</li>
  <li>This works fine on sql server versions 2000 and 2005</li>
  </ul>
  
  <p>Data:</p>
  
  <ul>
  <li>The only 'players' here are a) ant and b) the jdbc drivers. No custom code.</li>
  <li>we are using the 2.0 driver, i.e. from this file sqljdbc_2.0.1803.100_enu.tar.gz</li>
  <li>we are using the 'sqljdbc4.jar' version, i.e. the version required for JDK6. Md5sum is: 249734b9b7dafaccd92de99eee95d7d6</li>
  <li>Sql server's properties are as follows: product version:10.0.2531.0  </li>
  <li>Productlevel: SP1    </li>
  <li>Edition: Enterprise Edition</li>
  <li>We're using a jdbc url that looks like this: "jdbc:sqlserver://prodsql2;" (i.e. no extra properties passed at the end)</li>
  </ul>
  
  <p>Stack Trace:</p>
  
  <pre><code>com.microsoft.sqlserver.jdbc.SQLServerException: The server version is not supported. The target server must be SQL Server 2000 or later.
  at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
  at com.microsoft.sqlserver.jdbc.DBComms.Prelogin(Unknown Source)
  at com.microsoft.sqlserver.jdbc.DBComms.&lt;init&gt;(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
  at org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:31
  </code></pre>