.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

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

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

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

View Complete Post

More Related Resource Links

Error when running an SQL script to restore a database on SQL Server 2008 R2 Express

Hi, At work, I use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. At home, I also use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. Whenever I do work on the database at work, I usually restore the database at home (or vice versa) I have been using the following SQL scripts to back up the database and to restore the same database (at work or at home). BackupRealEstate.sql USE Master BACKUP DATABASE [RealEstate] TO DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH NOFORMAT, INIT, NAME = N'RealEstate-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO RestoreRealEstate.sql USE Master RESTORE DATABASE [RealEstate] FROM DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO Everything worked fine until I replaced my 8yo home computer with a newer and faster one. My new home computer is running Windows 7 Home Premium and I use the latest SQL Server 2008 R2 Express. When I tried to run the above restore SQL script, I got the following error message: Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. There was no other application/process using this database. Can someone please help me? Regards,

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 ?

Error Installing SQL Server 2008 Express: '' is not a valid login or you do not have permission


I have tried installing SQL Server 2008 multiple times on my machine, and I always receive this error about 3/4 of the way through: '' is not a valid login or you do not have permission.

I have tried installing both SQL Server 2008 Express with Tools and SQL Server 2008 with Advanced Services, and they both fail the same way. I am trying to do a new stand-alone installation.

I'm running Windows XP Home Edition SP3.

Looking into the error, some forums say I have to install it from THE Administrator account, and not an account with administrator permissions; it also cannot be in Safe Mode, because then the Windows Installer won't work. Unfortunately, I haven't been able to login to the Administrator account. I can go to the home login screen, do ctrl+alt+del twice, and attempt to login to the Administrator account, but I receive this error: Unable to Log You on because of an Account Restriction.

Other forums say that in the Server Configuration section, all you have to do is provide the username and a strong password from an administrative account on the computer, and it doesn't have to be THE Administrator. Well, I did that, but for some reason it doesn't recognize my username and passw

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




Error on upgrading from SQL Server 2005 to 2008 R2 from version 628 to version 629

We having dificulties in restoring a SQL Server backup from 2005(x86) to 2008 R2(x64). We used a typical backup/restore combination to a file. After importing data (aprox. 90GB), it gets to 100%, and then an error appears:

8631 - Internal error: Server stack limit has been reached. Please look for potentially deep nesting in your query, and try to simplify it.

We think the problem is related to a problem in one of the upgrade steps:

This is the output:
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.
100 percent processed.
Processed 11289048 pages for database 'My_Database', file 'FILE_Data' on file 1.
Processed 188 pages for database 'My_Database', file 'FILE_Log' on file 1.

Converting database 'My_Database' from version 611 to the current version 661.
Database 'My_Database' running the upgrade step from version 611 to version 621.
Database 'My_Database' running the upgrade step from version 621 to version 622.
Database 'My_Database' running the upgrade step from version 622 to version 625.
Database 'My_Database' running the upgrade step from version 625 to version 626.

Error upgrading SQL Server 2008


i was normally using VS2005 and SQL server 2005...

i upgraded to SQL Server 2008... and then...

i could not build my project anymore... because of this error:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source Error: 

Server 2008 R2 -> Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error mess


So I am using the aspnet_regiis.exe tool to encrypt sections of the web.config in my asp.net applications and services.  I have done this for years successfully on Windows Server 2003 (IIS 6).  However I just moved some apps over to Windows Server 2008 R2 (with IIS 7.5) and I am now receiving the following error at runtime:

"Server was unable to process request. ---> Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: Bad Data."

Now I am quite familiar with this process and am stumped at what I have missed this time around.  I have done ALL of the following which typically suffices for the process on the server. PLEASE READ ALL AND DO NOT PROVIDE RESPONSES OR LINKS FOR THINGS I HAVE ALREADY DONE Thanks!!  Wink

  1. Imported the keys to the server using aspnet_regiis -pi  Result: Success
  2. Given FULL permission (using -full switch) using aspnet_regiis -pa to ALL of the following accounts  Result: Success
    1. [SSRS 2008 R2]Report Builder Access error-The remote server returned an error: (401) Unauthorized.

      Hello,        I am able to login Web Service URL and report manager using computer name and report builder is also working fine.  http://RPTSRV/reportserver   (RPTSRV is report server name. web service url working fine. all accessible) http://RPTSRV/reports  (report manager working fine and all accessible ,report builder too) It means I am able to access everything locally right? http://rs.test.abc.com/reportserver  (web service url working fine. all accessible)  http://rs.test.abc.com/reports    (Report manager working fine and all accessible accept report builder)(I carefully checked the link and its taking rs.test.abc.com/reportserver.....)     when I click on reportbuilder button in report manager it shows me error dialog box with following error log!! I tried from local and remote computer too but gives the same error both side. I am not sure but I am just thinking is this double hop kerberos security issue? Please help me to solve this problem. I am finding solution from last 4 days. Reporting Service configuratin tool settings Web Serivice URL -  all set to default Report Manager URL - all set to default Environment - Distributed deployment Server1(report_srv) --Windows server 2003, Installed sql server 2008R2 reporting service,

SQL Server Network Interfaces Error 26 - while failing over SQL Server 2008 R2

Before I explain the issue I am facing, I would like to say that I did read the post at  http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx but in my case the problem is transient (lasts for approximately two minutes after a failover) so items 1-3 in the list of troubleshooting steps do not seem to make sense. As to 4 and 5, the named instances use non-default ports (2433 and 3433 respectively), so I do not know how to tailor the PortQry command for that. I tried  portqry.exe -n ServerA,2433-p UDP -e 1434 and  portqry.exe -n ServerA,2433 -p UDP -e 2434 and it failed both times with a "Failed to resolve name to IP address" while the server was up and serving database requests The same thing happened when I tried it with the failover server as well. ***The issue I am facing*** I am using Enterprise Library 4.1 to connect to a SQL Server 2008 R2 database with a mirror. My connection string itself is as below (with dummy values for all fields): "Data Source=ServerA;Failover Partner=ServerB;Initial Catalog=DBName;User ID=uid;Password=pwd;Connect Timeout=5" Sample .NET code is as below (with modifications to instantiate all variables locally to provide context): SqlDatabase db = new SqlDatabase(ConnectionString); SqlConnection cn = (SqlConnection)db

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.

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

Uninstall SQL Server 2008 trial version

I would like to know how to properly uninstall SQL Server 2008 trial version altogether.

SQL Server 2008 installation fails There was an error generating the XML document. Error code 0x84B

My system config: window XP - SP3 4 GB RAM, I have VS2008 with SP1, VS2010 Ultimate installed First when I tried to install SQL 2008 R2 Dev edition I got an error saying vs2008 SP1 was not installed, infact I had the SP1 installed in my m/c.  I did reinstalled the SP1 and tried to install SQL again. while in the final installation process I got the error  "Setup has encountered the following error: There was an error generating the XML document. Error code 0x84B10001." I uninstall the SQL server again to remove the files which were created from Unsuccessful installation I removed the register entry as suggested by this forum. reinstalled but no chance, I have tried all the option which I can get know in web. Please help me. here is the log files details  Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException 2010-08-26 14:54:53 Slp:     Message: 2010-08-26 14:54:53 Slp:         There was an error generating the XML document. 2010-08-26 14:54:53 Slp:     Stack: 2010-08-26 14:54:53 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache) 2010-08-26 14:54:53 Slp:   &nb

error while installing sql server 2008 r2 on win7

what can i do? i had .net framework 3.5 sp1 details is: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\Users\seven\AppData\Local\Microsoft_Corporation\LandingPage.exe_StrongName_ryspccglaxmt4nhllj5z3thycltsvyyx\\user.config line 5) ---> System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. File name: 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'    at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)    at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)    at System.Configuration.RuntimeC

BootstrapExtension.ExecuteWorkflowAction error while installing SQL Server 2008 R2

After installing Visual Studio 2010, I found that I could no longer open SQL Management Studio.  I could not even uninstall them because the uninstall was dying.   So I manually removed sql server from my system and now I am trying to install SQL Server 2008 R2 Express. However, the install is failing silently.  Here is the Detail_LandingPage log file:   2010-08-27 13:42:44 Slp: Log provider 'Microsoft.SqlServer.Chainer.Infrastructure.LogProviderFile' has been registered 2010-08-27 13:42:44 Slp: Log provider 'Microsoft.SqlServer.Chainer.Infrastructure.LogProviderStatus' has been registered 2010-08-27 13:42:44 Slp: Reading XML resource 'Microsoft.SQL.Chainer.PackageData.Package.xml' 2010-08-27 13:42:44 Slp: Reading schema resource 'Microsoft.SQL.Chainer.Package.Package.xsd' 2010-08-27 13:42:44 Slp: Document 'Microsoft.SQL.Chainer.PackageData.Package.xml' validated with schema 'Microsoft.SQL.Chainer.Package.Package.xsd' has been successfuly loaded into datastore path '/Datastore/Package' 2010-08-27 13:42:49 Slp: ---------------------------------------------------------------------- 2010-08-27 13:42:49 Slp: Running Action: ReadProductXML 2010-08-27 13:42:49 Slp: Reading XML resource 'Microsoft.SQL.Chainer.Product.Product.xml' 2010-08-27 13:42:49 Slp: Reading schema resource 'Microsoft.SQL.Chainer.Product.Product.xsd' 2010-08-27 13:42:49 Slp:

report viewer error / visual web developer 2008 / sql server 2008 / report viewer add on / win7 x64

hi, i decided to export my local site to iis today, the process wasn't smooth.   anyway. i was able to access my site, the db tables are working as i am able to create new records and retrieve them. my main problem now is with the report object. i've tried the work around found here : http://support.microsoft.com/kb/2002980.. it helped sort of. i used to have only a big page of error before i did the work around, now i am able to see half of the report (the report interface) but the contents, the field are filled with 404 errors. any idea how i can fix this??                  

Does MOSS 2007 Support SQL Server 2008 R2 RTM version?

Hi, We have MOSS 2007 SP1 databases in SQL Server 2005 EE x64 with SP3. Now, we want to upgrade the SQL Server 2005 to SQL server 2008 R2 EE x64 RTM version. Does MOSS 2007 Support SQL Server 2008 R2 RTM version? If yes, please take me to the MS link where I can find this information. Thanks
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