Microsoft KB Archive/243160

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft SQL Server version 7.0

-

BUG #: 55916 (SQLBUG_70)

SYMPTOMS
A cursor, which inserts data into a temporary table, may hang if the cursor was created asynchronously. The waittype for the server process ID (spid) in sysprocesses will be 0x20C and the lastwaittype will be CURSOR. This will not occur if the table being inserted into is a permanent one, or if the cursor is not generated asynchronously.

CAUSE
The hang is caused by a rare condition between the thread populating the cursor and the thread fetching the results.

WORKAROUND
You can work around this problem with either of the following methods:


 * Set the "cursor threshold" in sp_configure to -1 to make sure that no cursors are generated asynchronously.

-or-
 * Change the temporary table to a permanent table.

STATUS
Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words:

Keywords         : kbbug7.00 kbSQLServ700bug Version          : winnt:7.0 Platform         : winnt Issue type       : kbbug
 * }