FIX: Querying Sysmembers Might Result in a Leak of Buffer Pool Memory (328920)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q328920
BUG #: 362112 (SHILOH_BUGS)

SYMPTOMS

If you run a query whose execution plan contains a nested loops left semi-join operator against the sysmembers virtual table, the query can cause a leak in buffer pool memory, which can lead to the following error:

Error: 701
There is insufficient system memory to run this query.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How To Obtain the Latest SQL Server 2000 Service Pack

NOTE: The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.

The English version of this fix has the file attributes (or later) 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.
   Version      File name
   --------------------------

   8.00.682     Sqlservr.exe
				

NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.


WORKAROUND

This problem occurs if the sysmembers system table is the inner table for the nested loops join. Therefore, to work around this problem, modify the query so that the sysmembers system table is not the inner table of the nested loops join.

You can use query hints to force the join order so that the sysmembers system table is not the inner table. However, using query hints may change the performance of the query.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was first corrected in Microsoft SQL Server 2000 Service Pack 3.

REFERENCES

For more information about nested loop joins, see the "Understanding Nested Loops Joins" topic in SQL Server Books Online.

For more information about the left semi-join operators, see the "Left Semi Join" topic in SQL Server Books Online.

For more information about query hints, see the "SELECT" topic, located in the "Transact-SQL Reference" section of SQL Server Books Online.

Modification Type:MinorLast Reviewed:9/27/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix kbSQLServ2000preSP3fix kbSQLServ2000sp3fix KB328920