Article ID: 308627 - View products that this article applies to.
This article was previously published under Q308627
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 101422 (SQLBUG_70)
If you perform a DBCC SHRINKFILE or DBCC SHRINKDATABASE on a database that has a lot of text, ntext, or image data, the database may actually grow instead of shrink.
This problem does not occur on SQL Server 7.0 RTM or SQL Server 7.0 Service Pack 1 (SP1).
The shrink operation might cause mixed text pages to have only a small amount of bytes on each 8-K page. As data is re-allocated by the shrink, the database file grows instead of shrinking.
To verify you are experiencing this issue, run the following query from Query Analyzer in the database you are trying to shrink. See if there is a large difference between the "reserved" and the "used" column in the sysindexes system table for any one particular table that has a text, ntext or image type column:
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
301511NOTE: The following hotfix was created prior to Microsoft SQL Server 7.0 Service Pack 4.
(http://support.microsoft.com/kb/301511/EN-US/ )INF: How to Obtain the Latest SQL Server 7.0 Service Pack
The English version of this fix should have the following file attributes or later:
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.
Date Time Version Size File name ------------------------------------------------------- 4/5/2001 8:07 PM 7.00.987 4.82 MB Sqlservr.exe
To work around this behavior, use any of these methods:
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 7.0 Service Pack 4.
REFERENCESSQL Server Books Online; topic: "DBCC SHRINKFILE"
Contact us for more help
Connect with Answer Desk for expert help.