.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Issue with Registering to Redistribute SQL JDBC Driver

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :Sql Server

At the link http://msdn.microsoft.com/en-us/sqlserver/aa937725.aspx -  Register for Microsoft SQL Server JDBC Driver Redistribution Rights.

It appears that you can register to redistribute the SQL jdbc.jar.  Yet, when you click the I Accept -- you get a "broken link" or 404.    I registered with the Site Feedback for the SQL server site.   Anyone done this in the past or know if Microsoft still supports this?


View Complete Post

More Related Resource Links

SQL Server JDBC Driver 1.2 Issue

I am using JDBC 1.2 driver to connect to Sql Server 2005 database and i am facing the application crash issues several times and javacores shows that the crash happens during JDBC call. This issue is happening several times in our application, please let me know if an upgraded driver version will fix the problem or to investigate the driver issue further NULL            1XMCURTHDINFO  Current Thread Details NULL           ---------------------- 3XMTHREADINFO      "WebContainer : 8" (TID:0x5946E100, sys_thread_t:0x51D052F0, state:R, native ID:0x000008AC) prio=5 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/PLPInputStream.getBytes(Bytecode PC:64(Compiled Code)) 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/DDC.xmlPLPToObject(Bytecode PC:132(Compiled Code)) 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/ServerDTVImpl.getValue(Bytecode PC:216(Compiled Code)) 4XESTACKTRACE          at com/microsoft/sqlserver/jdbc/DTV.getValue(Bytecode PC:216(Compiled Code)) 4XESTACKTRACE          at com/micro

How can I improve the performance of batch inserts with the JDBC driver?

In our testing, batch inserts are more than 4 times faster on Oracle with the Oracle JDBC driver than on SQL Server with either the Microsoft or jTDS JDBC drivers on the same hardware.  The issue appears to be with the JDBC driver, not the database server.  We have run tests with SQL Server 2005/2008 on a number of machines with similar results. The following code shows a simplified example of the code we are executing.  It uses a 2 column table which has an index on the id column.  In the test program we are inserting 100k rows with a batch size of 10k.  Any suggestions on improving the performance with the SQL Server JDBC driver?   private void testBatchInserts(Connection conn, int rows, int batchSize) throws SQLException {     String sql = "INSERT INTO Bench (id, name) VALUES (?, ?)";     conn.setAutoCommit(false);     PreparedStatement stmt = conn.prepareStatement(sql);     int batchCount = 0;     // For each row...     for (int i = 1; i <= rows; i++) {       // Create the record       stmt.setInt(1, i);       stmt.setString(2, "ROW #" + i);       // Add it to the batch       stmt.addBatch(); &nb

How do I install SQL Server 2005 JDBC driver

I'm an new bie to "SQL Server 2005 JDBC Driver". I have downloaded SQL Server 2005 JDBC driver and extracted it to C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\. Is the installation complete now? How can I use this driver from my application? If there is a step-by-step instruction on whether we need to run some scripts in SQL Server or to configure some system variables, it would be great. Thanks in advance for your time in this.Cheeeeerrzzzz! S@kthi http://blogs.msdn.com/sqlsakthi | http://twitter.com/PowerSakthi Mark as Answer if it helps. This posting is provided "AS IS" with no warranties and confers no rights.

Microsoft SQL Server 2005 JDBC Driver

I'm getting the following exception when attempting to connect to SQL Server 2005 using Microsoft's new JDBC driver: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect The help docs suggest checking connectivity using telnet. So attempting to connect via telnet to generates: Could not open connection to the host, on port 23: Connect failed. So I try to start telnet: net start telnet I get the following error message: The service cannot be started either because it is disabled or because it has no enables devices associated with it. Can anyone help? Thanks

Microsoft JDBC driver 3.0

Our application used Inet opta driver. Would like to try out the Microsoft driver. If you have used this driver, please provide more info on Microsoft jdbc driver 3.0.

Phillips MP3 player and MTP driver not registering, will only register as a MSC

I have been trying for the past 2 weeks to get my MP3 player to connect as a MTP and not a MSC, unfortunately to no success. We have 3 of the same MP3 players and none of them will connect as a MTP. I can get Rhapsody to work on the cpu, Media Player 11 will work on the cpu but in device manager the MP3 will still come up as a MSC and not a MTP. This cpu is a brand new build with me still using Windows XP PRO from the previous build however I had Media Player 10 on the last build and now I have 11 with the most current Rhapsody version 5.337. My previous build was a P4 this one is a AMD build. I don't believe that is the problem.  I have tried the following items and am at a loss as to what to try next. I have worked with Rhapsody and Phillips on the following items; reinstall all of the Rhapsody software (5 times), reinstall windows media player 11 (3 times), clean and clear MP3 reinstall software (7 times), deleted and reinstalled USB drivers (2 times), reinstalled the MTP drivers seperately and just yesterday I have performed a complete reinstall of windows and all drivers to no avail. MP3 player information is model SA1VBE04KW/17 All windows software is current and up to date. System informatio as follows; Microsoft Windows XP Professional, Verison 2002, Service Pack 3 Computer information; AMD Phenom 8250e, Triple Core Processor, 1.91

Recommend the best JDBC driver and version to connect to SQL server 2005 sp2


SQL version details:Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2) on a clustered server.

Are there any issues using:

JDBC driver: Microsoft SQL Server JDBC Driver 3.0.
JBOSS: JBoss 4.2.3 with JDK 6 ?

MSSQL 2005 JDBC driver multiple select statements in stored procedure



we have a stored procedure with multiple select in it.



Select a,b,c from table1

Select f,g,h  from table2

Select j,k,l  from table3


Sometimes select no 2 will not return any values.

when this happens  we get only 2 result sets using CallableStatement getMoreResults method. 

it seems that if a select  doesn't return something it will  not have a corresponding resultset. 

On 2000 (driver + server) version we got an empty resultset for this situation. 

Is there  any  way to have the same behaivor with 2005 ?   We tryed with 1.2 and 2.0 jdbc driver.




JDBC 3.0 Driver Permanently Locks Table

I am using the JDBC driver to insert data into a SQL Server Express database. The JDBC driver running in a Tomcat servlet completes the insert with no exception. However, subsequent actions using the Microsoft SQL Server Management Studio on the table just operated on by the JDBC driver all timeout. The only recovery option is to restart SQL Server. Operations on other tables in the same database are unaffected.

Upgrade to 4.0 - "Arithmetic operation resulted in an overflow Error" - MySQL driver issue


I upgraded to 4.0 and I'm now getting "Arithmetic operation resulted in an overflow Error" whenever I try to call information from the database. I'm using MySQL ODBC 5.1 for the site.

When I first started getting the error I could only return integer values and was using the connection string:

Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=

JDBC 3.0 Driver Permanently Locks Table

I am using the JDBC driver to insert data into a SQL Server Express database. The JDBC driver running in a Tomcat servlet completes the insert with no exception. However, subsequent actions using the Microsoft SQL Server Management Studio on the table just operated on by the JDBC driver all timeout. The only recovery option is to restart SQL Server. Operations on other tables in the same database are unaffected.

Websphere with Microsoft SQL JDBC Driver 2.0 eats up CPU when StaleConnection is encountered


Here's what happened

1. SQL Server started as a service

2. Websphere (with JDBC Data Source utilizing MSSQL JDBC Driver) is started via startserver.bat

3. I ran my application a few times (which accesses the database)

4. I restart the MSSQL Service

5. I click on a button that attempts to query the database

6. CPU utilization of websphere shoots up and doesn't return to 0 (unless you restart websphere)


To investigate I isolated the DataSource and Connection object generation in a Serverside script and that seems to work fine but when you put them inside Stateless, Container Managed Session Beans then it sort of goes into limbo.  Weird thing is that the same code, when using DataDirect, works well.

However, since it seems like DataDirect is not packaged with websphere anymore, Im left with no option but to use MSSQL JDBC Driver.  Any thoughts on how I can reclaim those CPU resources?  Unfortunately, a try catch doesnt help since program hangs when it executes Connection.execute() - meaning it doesn't reach the catch part

Sql 2008 peer-to-peer replication and jdbc driver


Hi, sorry but i'm a sql dummy...:-)

I setup a sql 2008 p2p replication for a database.

Can i specify, on a jbdc connection string, the path of the 2 sql server for automatic failover?

I try failoverPartner variable, but this is only for database mirroring.....

Can u help me?

Thanks in advance


Conversion error in the JDBC 3.0 driver when accessing metadata


I am using SQL Server 2008 R2 and the SQL Server JDBC driver 3.0.1301.101.

When reading meta data for a table I get the following SQLServerException on column 22 (SOURCE_DATA_TYPE)

The conversion from char to SMALLINT is unsupported.

The following code demonstates the problem.

import java.sql.*;
import com.microsoft.sqlserver.jdbc.SQLServerDataSource;

public class SQLJDBCTest {

 public static void main(String[] args) {
  SQLServerDataSource ds = new SQLServerDataSource();

  Connection cn = null;
  ResultSet rs = null;
  try {
   cn = ds.getConnection();
   rs = cn.getMetaData().getColumns("Archive25", "dbo", "CountryCode", null);
   if(rs != null) {
    ResultSetMetaData rsm = rs.getMetaData();
    while(rs.next()) {
     for(int i = 1; i <= rsm.getColumnCount(); ++i) {
      String cname = rsm.getColumnName(i);
      Object obj = rs.getObject(i);
      System.out.println(cname + " " +obj);
  }catch(Exception ex) {


'TDS Protocol stream is not valid' error when running SQL Server 2008 with jdbc driver of version


I am using SQL Server 2008 on Windows Server 2008 R2 and one of our servers running as a windows service (on Windows Server 2008 R2) contacts the SQL Server 2008 in a timely fashion to get some information. During one of these runs, we encountered the following error logs in the service logs and thereby we took a hit in serving client requests. The jdbc jar that is used for database connectivity is of version 3.0 (sqljdbc.jar).


I can provide more details on this issue. Can someone please let us know why this can be occurring ? Just so you know, the set of errors repeats itself after sometime although on a different JDBC Connection (with different ConnectionID). We have a reconnection algorithm running in case the JDBC Connection is lost for some reason (but I would be surprised if this issue relates to the re-connect algorithm).


INFO   | jvm 1    | 2011/02/28 22:26:54 | Feb 28, 2011 10:26:54 PM com.microsoft.sqlserver.jdbc.TDSParser throwUnexpectedTokenException
INFO   | jvm 1    | 2011/02/28 22:26:54 | SEVERE: TDSReader@4686d ( ConnectionID:25 TransactionID:0x0000000000000000): FetchBufferTokenHandler: Encountered unexpected TDS_RET_STAT (0x79)
INFO   | jvm 1    | 2011/02/28 22:26:54 | Feb 28, 2011 10:26:54 PM com.microsoft.sqlserver.jdbc.TDSReade

cannot connect to sql server 2008 by MS JDBC driver


hello everyone!

i have this code for connecting to sql server 2008 from netbeans ide but i cannot connect to my db,

can someone tell me if i have a problem with my db, which schema is required for this connection?


 * To change this template, choose Tools | Templates

 * and open the template in the editor.




package library;


import java.sql.Connection;

import java.sql.Statement;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.ResultSetMetaData;

import java.sql.SQLException;

import java.util.logging.Level;

import java.util.logging.Logger;



public class Displayauthers {


    static final String JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";

    static final String DATABASE_URL = "jdbc:sqlserver//localhost:1433;" +

         "databaseName=DB_Library; user=sa; password=softPRO3";



     * @param args the command line arguments




JDBC Driver - is the connection to DB encrypted?


I'm using the JDBC4 driver.  As with most Java DB connections you create a connection URL similar to:

jdbc://myDatabaseServer user=jimmy; password=foobarbaz

My question is: is this login data transmitted to the SQL server in a secure manner when using the Microsoft JDBC4 driver?






ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend