BUG: Unhandled Exception in SQL Server Using Keyset Cursors

Last reviewed: April 16, 1997
Article ID: Q166233
The information in this article applies to
  • Microsoft SQL Server, version 6.5
BUG #: 16560 (Windows NT: 6.50)

SYMPTOMS

SQL Server seems to stop responding and becomes unresponsive when running cursor queries that require keyset cursors. The errorlog indicates an access violation (AV) and the following error:

   closetable: table already closed for sdes '%*.d'

There is no message in the errorlog about SQL Server being shut down. The client receives the following error:

   Error 10037
   Unexpected EOF from SQL Server.  Connection broken.

CAUSE

SQL Server version 6.5 introduced the asynchronous generation of keysets for keyset cursors, using "subprocess." The optimizer decides the number of records in the result set based on the statistics information, and if this number is within the cursor threshold, the keyset values are generated synchronously. When this number exceeds the "cursor threshold" setting, it uses asynchronous generation of keysets by forking a "subprocess" to populate the keyset cursor. When the subprocess completes, it closes itself and while doing so, it generates an access violation that is not completely handled.

WORKAROUND

To work around this problem, either set the "cursor threshold" configuration parameter to a higher value, or set it to the default setting of -1 (all cursors will be generated synchronously). Running update statistics to have latest distribution information may help the optimizer determine the result set more accurately.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

If any replication-related process runs into the above scenario, Sqlexec.exe also generates an unhandled exception error before Sqlservr.exe. Otherwise, if the SQLExecutive service is set to restart the MSSQLServer service, the service will be restarted and the client gets the following error message:

   Unexpected EOF from SQL Server. Connection Broken.

If the server is restarted automatically by SQLExecutive service, errorlog.1 will contain the above information.


Additional query words: GPF terminate die hang freeze lock
Keywords : kbbug6.50 SSrvGPF SSrvRep buglist2.01
Version : 6.5
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.