FIX: DBCC SHRINKFILE with Empty Option May Not Move Heap and Text Pages

Article translations Article translations
Article ID: 279511 - View products that this article applies to.
This article was previously published under Q279511
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57330 (SQLBUG_70)
Expand all | Collapse all

Symptoms

Executing a DBCC SHRINKFILE (data_filename, EMPTYFILE) command on a multifile database with mostly heap or text pages may not empty pages from the first extent of the data file. Hence, the file cannot be dropped after the shrink operation is completed using ALTER DATABASE.

Cause

The allocation code sometimes reallocates pages out of the first extent of a file that DBCC SHRINKFILE (data_filename, EMPTYFILE) was trying to clear.

Workaround

There are two ways to work around this problem:
  • If the table is a heap, create a clustered index before executing the DBCC SHRINKFILE (data_filename, EMPTYFILE) command.
  • If the table is a heap or contains at least one text or image column, transfer the table to another file group before executing the DBCC SHRINKFILE (data_filename, EMPTYFILE) command.

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.

Properties

Article ID: 279511 - Last Review: November 2, 2013 - Revision: 3.0
Applies to
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB279511

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com