This article has been archived. It is offered "as is" and will no longer be updated.
Bug #: 471227 (SHILOH_BUGS)
Microsoft SQL Server 2000 fixes are distributed as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2000 fix release.
When you run a CREATE INDEX statement or a DBCC DBREINDEX statement on a computer that is running SQL Server, and the awe enabled configuration option is set to 1, the following BPool::Map warning and the DBCC MEMORYSTATUS statement may be written to the SQL Server error log:
Note The index that is being created must reside in a database that is either set to the simple recovery model or to the bulk logged recovery model.
Service pack information
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 How to obtain the latest SQL Server 2000 service pack
The English version of this hotfix 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.
Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.
Note To enable the hotfix, you must enable the trace flag 3940. To enable the trace flag dynamically, run the DBCC TRACEON(-1,3940) command just before you rebuild the index. Then, disable the trace flag by running the DBCC TRACEOFF(-1,3940) command.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.
When a database uses the simple recovery model or the bulk logged recovery model, all dirty pages must be written to disk before the transaction commits. Dirty pages are pages that have been modified but not yet written to disk. SQL Server uses a mechanism that issues asynchronous write requests after a certain number of pages have been modified, even before the transaction commits. In the commit logic, the database engine waits for all asynchronous write requests to complete. However, SQL Server does not use any type of throttling mechanism to limit the number of outstanding asynchronous write requests.
In the circumstances where this problem occurs, the CREATE INDEX operation was building a new nonclustered index immediately after the operation built a clustered index, and the table fit in the cache. Additionally, the table size permitted the CREATE INDEX process to perform an in-memory sort. No intermediate sorted runs must be written to disk. Therefore, the index creation process can read, sort, and dirty pages at a very high rate. The combination of many stolen buffers that were being used for the sort and the lack of throttle in issuing the write operations may cause the whole address space of mappable buffers to be temporarily unavailable.
To resolve this problem, trace flag 3940 was added. Trace flag 3940 throttles the number of concurrent asynchronous write requests to 1,024. When this trace flag is enabled, the code that is flushing dirty pages for that transaction waits for every 1,024th write operation to complete before the code issues additional write requests. This throttling might theoretically cause a very small performance degradation. Because the problem occurs in very few cases, Microsoft decided to fix this problem by using a trace flag so that any customer who does not receive the BPool::Map warning is not affected by the possible performance difference.
This problem may theoretically occur because of an operation other than a CREATE INDEX operation, but other causes have not been discovered. To confirm that this bug was the likely cause of the BPool::Map warning, look for the following additional symptoms from the DBCC MEMORYSTATUS output in the SQL Server error log:
Buffer Distribution: Stolen is a large value and typically accounts for at least one third of the mappable buffers. The exact mappable count depends on many factors, including whether Microsoft Windows is running with the /3GB switch and the physical memory in the computer. Generally, the mappable count is around 200 thousand for a 2 GB address space and around 320 thousand for a 3 GB address space.
The difference between the Query Memory Manager: Maximum value and the Query Memory Manager: Available value is typically within several thousand of the stolen value.
Buffer Distribution: Dirty is large, typically more than 80 thousand buffers.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates