FIX: Aborting Parallel Query With Hash Operation May Orphan Extents in Tempdb (262019)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q262019
BUG #: 57871 (SQLBUG_70)

SYMPTOMS

If you abort a parallel query that is performing a hash operation, and the hash operation requires tempdb space for workfiles, extents may be orphaned in the tempdb database. Eventually, this may cause the tempdb database to grow larger than expected. If you run a DBCC CHECKDB on the tempdb database while the system is completely idle, this error message occurs:
Server: Msg 8905, Level 16, State 1, Line 0
Extent (1:160) in database ID 2 is marked allocated in the GAM, but no SGAM or IAM has allocated it.
NOTE: You may see the 8905 error occur if you run CHECKDB on the tempdb database while there is activity on the system, which is not indicative of a problem.

WORKAROUND

To work around this behavior, disable parallelism either for the specific query in question, or for the system as a whole. Parallelism can be disabled for an individual query by appending "OPTION (MAXDOP 1)" to the end of the query. You can disable parallelism for the server by setting the "max degree of parallelism" value in sp_configure to 1.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.

MORE INFORMATION

The query might abort due to an attention (that is, canceling the query or getting a timeout), or it may also abort due to some internal error, such as insufficient memory.


Modification Type:MajorLast Reviewed:4/7/2006
Keywords:kbBug kbfix kbQFE KB262019