SQL SERVER 2000 with SP4

With SQL 2000 server using com.microsoft.jdbc.sqlserver.SQLServerDriver as the SQL driver class from msbase.jar, mssqlserver.jar and msutil.jar if you hit a error like

SEVERE: Standard SQL Exception Info for exception at level 0 - SQL State: 'HY000'; SQL Error Number: '0'; SQL Error Text: '[Microsoft][SQLServer 2000 Driver for JDBC]The DBMS returned an unspecified error.';[Microsoft][SQLServer 2000 Driver for JDBC]The DBMS returned an unspecified error. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

Then the issue is with the jdbc driver, upgrade your driver to SQL 2005 server driver. This will resolve the problem. The jar will be sqljdbc.jar. If you are planning to use the latest jar of about 570KB this is good but you might hit the other error.


SEVERE: Standard SQL Exception Info for exception at level 0 - SQL State: '08S01'; SQL Error Number: '0'; SQL Error Text: 'The TDS protocol stream is not valid.';SEVERE: com.microsoft.sqlserver.jdbc.SQLServerException: The TDS protocol stream is not valid. at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.throwInvalidTDS(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSReader.throwInvalidTDS(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSParser.throwUnexpectedTokenException(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onRetValue(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSParser.parse(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(Unknown Source) at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:169)


To resolve this download and use the Microsoft SQL Server 2005 JDBC Driver 1.2 or 1.1 from
http://msdn.microsoft.com/data/jdbc

No comments:

Followers