Microsoft KB Archive/307655

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

Article ID: 307655

Article Last Modified on 10/7/2005

-

APPLIES TO


 * Microsoft SQL Server 2000 Service Pack 3a

-



This article was previously published under Q307655



BUG #: 355529 (SHILOH_BUGS)



SYMPTOMS
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.



CAUSE
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.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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.



WORKAROUND
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



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



MORE INFORMATION
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.

Keywords: kbbug kbfix kbqfe kbsqlserv2000sp1fix kbsqlserv2000presp2fix kbhotfixserver KB307655

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.