Question : Error message from SQL Server 2005 appearing in SQL Server 2008

I have a webservice running on a Windows 2008 Server, all latest patches installed.  This is a very simple webservice, it receives xml files and then does simple table inserts.  The database that it is connected to is a SQL Server 2008 database, version 10.0.1600.
The application was written in Visual Basic using Visual Studio 2005 and use the SQL ClientClass to connect to the DB.
The application has successfully gone into production and is working fine, it is a retail application tracking transactions from stores and over 450 stores are successfully sending information to the webserver and so far over 5M lines have been written to the DB.
However....
On some days I am receiving errors to the log file that contain an error message that can be traced back to SQL Server 2005. An example of the error is shown below:

27/01/2010 12:09:35 PM ==> System.Data.SqlClient.SqlException: New request is not allowed to start because it should come with valid transaction descriptor.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at CGL.POS.CustomerSpecials.POSTransactionManager.AddItem() in C:\projects\CustomerSpecialsClassLibrary\TransactionManager.vb:line 406
   at CGL.POS.CustomerSpecials.POSTransactionManager.Add_WS_Item(XmlDocument transactionDoc, Int32 store, Int32 TransactionHeaderNumber, String TransID) in C:\projects\CustomerSpecialsClassLibrary\TransactionManager.vb:line 623
   at CGL.POS.CustomerSpecials.POSTransactionManager.ProcessTransactionXMLFile(XmlDocument xmlFilein) in C:\projects\CustomerSpecialsClassLibrary\TransactionManager.vb:line 40


The code is robust, seems to work without problems 99.9999% of the time, I have checked the XML file coming in and it is OK, no errors.  I can't find any reference to this error message with regard to SQL Server 2008, the most relevant message is here: http://support.microsoft.com/kb/916002

When one error comes through, it seems to cascade through, making every transaction error for about 2 minutes, then seems to reset and be fine.  My gut feel is that it is related to load on the server/webservice, the errors normally occur around peak selling time (midday for our company).

Is this error still there in SQL Server 2008?  Has anyone seen this error before with 2008?

Answer : Error message from SQL Server 2005 appearing in SQL Server 2008

This fix is for the .NET Framework 2.0 not for SQL Server.  So this fix does not apply to a particular version of SQL Server (other than to say that it was connecting to SQL 2005) or Windows Server.  It is an ADO.NET fix which is in the .NET Framework.

But in this case, since it is a retired KB, which I did not see before, I would say that I would make sure that you are running the latest SQL Client on the webservice machine (SQL native client and client connectivity for SQL 2008) and go from there.  I will keep looking to see if there is anything else, but it seems clearly that it is a problem with the SqlClient libraries and not with SQL Server 2008 itself.
Random Solutions  
 
programming4us programming4us