Microsoft KB Archive/872968

= You may notice that the SQL Server ODBC driver stops responding when you run a lengthy and asynchronous query =

Article ID: 872968

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft Data Access Components 2.8

-





SYMPTOMS
When you use the Microsoft SQL Server ODBC driver to run a lengthy and asynchronous SQL Server stored procedure query, your application may stop responding.



CAUSE
Typically, the queries are sent from the client computer to the server by using an application-level protocol that is named Tabular Data Stream (TDS) that is specific to Microsoft SQL Server. The SQL Server ODBC driver builds the TDS packets and then sends the packets to the SQL Server client network library to encapsulate the TDS packets in TCP/IP packets. Finally, the data is sent to the server. The communication from server to client occurs in the same way.

When you pass a lengthy and asynchronous query to the client computer, the SQL Server ODBC driver processes the query with the help of the SQL Server client network library. At the same time, the SQL Server ODBC driver receives the result that is returned by the server in the form of TDS packets. When the SQL Server ODBC driver starts reading the result from the SQL Server client network library, the driver may read the entire result or a part of the result depending on the size of the data that is returned or depending on the buffer that is allocated to read the data. If the SQL Server ODBC driver reads data in pieces, then it must synchronize each piece of data to build the complete information. This typically occurs when there is an execution of asynchronous data. In some cases, the SQL Server ODBC driver code may lose this synchronization, and the application stops responding. If your Network Interface Card (NIC) is faulty, you may notice the behavior that is mentioned in the &quot;Symptoms&quot; section.



RESOLUTION
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that this article describes. Apply this hotfix only to systems that are experiencing this specific problem.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. 

Date    Time       Version        Size     File name 08-Jul-2004 20:21  2000.85.1048.0     28,672  Dbnmpntw.dll 08-Jul-2004 20:18  2.80.1048.0       147,456  Msadds.dll 08-Jul-2004 20:18  2.80.1048.0       507,904  Msado15.dll 08-Jul-2004 20:19  2.80.1048.0       163,840  Msadomd.dll 08-Jul-2004 20:19  2.80.1048.0       184,320  Msadox.dll 08-Jul-2004 20:18  2.80.1048.0        53,248  Msadrh15.dll 08-Jul-2004 20:19  2.80.1048.0       225,280  Msdaora.dll 08-Jul-2004 20:18  2.80.1048.0       147,456  Msdart.dll 08-Jul-2004 20:21  2.575.1048.0      139,264  Msorcl32.dll 08-Jul-2004 20:18  3.525.1048.0      221,184  Odbc32.dll 08-Jul-2004 20:21  2000.85.1048.0     24,576  Odbcbcp.dll 08-Jul-2004 20:18  2.80.1048.0       442,368  Oledb32.dll 08-Jul-2004 20:18  2000.85.1048.0    503,808  Sqloledb.dll 08-Jul-2004 20:18  2000.85.1048.0    401,408  Sqlsrv32.dll 08-Jul-2004 19:04  2000.85.1048.0    208,896  Sqlxmlx.dll



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
You notice the following stack reading when your application stops responding:

Call Stack #1:

01e5ec8c 71bb1151 ws2_32!WSARecv+0x75

01e5ecb8 6d56130e wsock32!recv+0x31

01e5ecf8 0216843b dbnetlib!ConnectionRead+0x2ca

01e5ed48 021688be sqlsrv32!getbytes+0x1fa

01e5ed84 021686f1 sqlsrv32!FlushInputStream+0x7a 01e5edc0 021688be sqlsrv32!getbytes+0x4b0 01e5edfc 021686f1 sqlsrv32!FlushInputStream+0x7a

01e5ee38 02152202 sqlsrv32!getbytes+0x4b0

01e5eed4 0214f7b0 sqlsrv32!GetColData+0xad2

01e5ef88 02150429 sqlsrv32!FetchRows+0x627

01e5efb8 0216fcf5 sqlsrv32!FetchScroll+0x2c4 01e5efdc 004281e1

sqlsrv32!SQLFetch+0xc3

Callstack #2:

ChildEBP RetAddr 01e5f348 77f43741 SharedUserData!SystemCallStub+0x4 01e5f34c 71b23ac3 ntdll!NtWaitForSingleObject+0xc

01e5f388 71b2b13e mswsock!SockWaitForSingleObject+0x19b

01e5f400 71c0134f mswsock!WSPRecv+0x1f0

01e5f43c 71bb1151 ws2_32!WSARecv+0x75

01e5f468 6d56130e wsock32!recv+0x31

01e5f4a8 0216a66f dbnetlib!ConnectionRead+0x2ca

01e5f4f8 0213d1a4 sqlsrv32!getbytes+0x1f2 01e5fbac 0216b39e

sqlsrv32!ProcessTDSStream+0x207 01e5fbd0 0213c21c sqlsrv32!Cancel+0x87

01e5fbe8 0214d391 sqlsrv32!SQLFreeStmt+0xa0

01e5fbf8 00407b89 sqlsrv32!SQLFreeHandle+0x37 01e5fc1c 0041eded odbc32!FreeStmt+0x171

01e5fc38 0103c5bf odbc32!SQLFreeHandle+0x1fd

