FIX: Querying Syslockinfo with Large Numbers of Locks May Cause Server to Stop Responding

This article was previously published under Q307655
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 355529 (SHILOH_BUGS)
When there are several rows in a table, joins of virtual system tables such as syslockinfo or sysprocesses may cause the computer that is running SQL Server to become unresponsive to other client requests. Logins to the server may not be processed in a timely fashion, and simple queries such as
SELECT * FROM pubs.dbo.authors				
may take several seconds to respond.
The code to build these tables from their in memory data structures is in a code path where it does not yield or allow other requests to be processed.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if 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. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. The English version of this fix should have the following file attributes or later:
   Version      File name      --------------------------   8.00.444     Sqlservr.exe				
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.

To work around this problem, use a SELECT statement to move the required information from the system tables into a temporary table, and then perform the join with the temporary table. For example, look at the method used by the blocking script in the following Microsoft Knowledge Base article:
271509 INF: How to Monitor SQL Server 2000 Blocking
Microsoft has confirmed this to be a problem in SQL Server 2000.
The syslockinfo and sysprocesses system tables are some of the virtual system tables within SQL Server. Syslockinfo and sysprocesses do not require any physical storage in the database. Each time the tables are queried, they are materialized from the in memory data structures within SQL Server that track a lock or user connection, respectively.

In cases where there are multiple joins with these tables, it is much more efficient to create a temporary table and insert the data into the temporary table. You can then perform the joins with the temporary table.

Article ID: 307655 - Last Review: 10/24/2013 07:36:01 - Revision: 3.4

  • Microsoft SQL Server 2000 Service Pack 3a
  • kbnosurvey kbarchive kbautohotfix kbhotfixserver kbqfe kbbug kbfix kbqfe kbsqlserv2000presp2fix kbsqlserv2000sp1fix KB307655