Home » SQL Server Error : 10008, Severity: 16. The provider terminated the operation.

SQL Server Error : 10008, Severity: 16. The provider terminated the operation.

SQL Server Error : 10008 Details


SQL Server Error: 10008
Severity: 16
Event Logged or not: No
Description:
The provider terminated the operation.
Severity 16 Description:
Indicates general errors that can be corrected by the user.

When you run a DB-Library (DB-Lib) application, the following error message is received:

Error 10008, Bad token from SQL Server: Datastream processing out of sync.

A DB-Lib application uses a tabular data stream to interface with a SQL Server over the network (TDS). The network operating system provides and maintains a designated pipe over which the TDS is transmitted. This TDS is automatically parsed by each DB-Lib application to extract useful information (for example, query result rows).

A 10008 error is generated when DB-Lib is unable to parse the TDS:

Datastream processing is out of sync due to a bad token from SQL Server.

This error could be caused by one of two things:

1. The first possibility is that the data passing over the network called pipe is corrupt. This is always caused by a network issue affecting either network hardware or network software.

2. The network may have sent a message through the identified pipe as the second possible cause. If the numreqbuf value in the [server] section of LANMAN.INI is too low, the number of named pipes that can be open at one time is limited in LAN Manager version 2.0. When this happens, LAN Manager transmits an error through the named pipe, which is misinterpreted by dblib, resulting in a 10008 error.

Reading sql server error log location from SQL Query

Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.

USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go

For other ways to read and find error log location please our article https://sqlserver-dba.co.uk/error-log/sql-server-identify-location-of-the-sql-server-error-log-file.html

Solution for Resolving the Error

Run network diagnostics or look for potential network issues. Remember that the issue could be caused by any networking gear or software on the server or client.

In the Microsoft Knowledge Base, search for the following phrases to learn more about the second problem and how to increase the numreqbuf value:

(LAN Manager) and (Peer Service) and (configuring) and (SQL Server)

When writing a DB-Lib application, you can gracefully handle the 10008 error by trapping it in the DB-Lib application’s error handler. You can then close the DBPROCESS connection, establish a new one, and resend the query after receiving it.

SQL Server Error Code and solution summary


SQL Server Error: 10008
Severity: 16
Event Logged or not: No
Description:
The provider terminated the operation.

Leave a Reply

Your email address will not be published.