FIX: AUTO-SHRINK Option or DBCC SHRINKDATABASE May Slow Down SQL Server 2000 Performance

Article translations Article translations
Article ID: 296386 - View products that this article applies to.
This article was previously published under Q296386
BUG: 353307 (SHILOH_BUGS)
Expand all | Collapse all

SYMPTOMS

If a database is full or nearly full, and a large number of the tables in the database do not have clustered indexes, the AUTO-SHRINK database option or DBCC SHRINKDATABASE command may cause severe performance degradation for SQL Server 2000.

The performance may degrade to the point where queries do not return results in a timely fashion. It takes longer for new connections to connect, resulting in connection timeouts. SQL Server 2000 may appear to stop responding (hang).

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

WORKAROUND

To work around this problem, you can do the following:
  • Create a clustered index on all of your tables.
  • Turn off the AUTO-SHRINK option for the database.

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 2.

MORE INFORMATION

To turn off the AUTO-SHRINK option for a database, for example Pubs, run the following command from Query Analyzer from the 'master' database, after logging in as 'sa':
ALTER DATABASE pubs SET AUTO_SHRINK OFF
				
You can also turn off AUTO-SHRINK by using SQL Server Enterprise Manager (SEM). For more information, see the "Setting Database Options" topic in SQL Server Books Online.

Properties

Article ID: 296386 - Last Review: October 17, 2003 - Revision: 3.2
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbbug kbfix KB296386

Give Feedback

 

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